Use a custom cordova plugin

Hi,
I want to use this cordova plugin : https://github.com/xseignard/cordovarduino.
But I always have the same error : Error TS2304: Cannot find name ‘serial’.

I have added the plugin with : cordova plugin add cordovarduino

Do you have any ideas about this issue ?

I don’t from where I have to import serial ?

Thank you !

Add this line to your ts file declare var serial; :

import {Component} from '@angular/core';

declare var serial;

@Component({
  templateUrl: './build/your-template.html'
})
export class yourPage { }

And with that, can I use all the functions which are in the plugin ?
Thank you.

Yes you can do it :wink:

Amazing !!! Thank you very much !! Could you explain how it works ? How can I use all the function inside the plugin, just in declare a variable ?

Hello,

does this work only in Components or in “service” classes too? I try to use cordova-plugin-zeep. I tried to declare $cordovaZeep. But it is always undefinied.

Thank you