Adding non native cordova plugin to ionic 2 project stop working


#1

Hi
In July I created an ionic 2 project and added this plugin:
https://github.com/xumingxin7398/cordovaEsptouch
by this way:

cordova plugin add https://github.com/xumingxin7398/cordovaEsptouch.git
and in the page ts file I put:
declare var esptouchPlugin;
and used the plugin like this:
getLocalIP(){
esptouchPlugin.smartConfig(“someSSID”,“b2:05:2f:92”,“somepass”,“YES”,1, function(res) {
console.log(res);
},
function(error){
console.log(error) ;
});
}

everything worked just fine but I than upgrade my ionic 2 and created a new project and the same steps produced this error:

Runtime Error
Error in ./HelloIonicPage class HelloIonicPage - caused by: esptouchPlugin is not defined

What am I missing here? what changed? Do I use a non native plugin correctly?
thanks


#2

same problem i am running through, can anyone help?


#3

Hey did you got in ionic 1?


#4

I’m trying add to ESPTouch “https://www.npmjs.com/package/cordova-plugin-esptouch” to my app, Getting same error. Do you figured out how to make this work ?