Closed JohannesHoffmann closed 7 years ago
Which errors are you referring to? The JS portion of the plugin is only 8 lines of code, hard to imagine a lot of errors being generated due to that. If you could share I can take a look.
networkinterface.getIPAddress(function (ip) { alert(ip); }); Error ReferenceError: networkinterface is not defined
any update on this ??
Please add the following line to your TypeScript before referencing the plugin:
declare var networkinterface: any;
i have used this line. But still not working.
On Jun 3, 2017 23:05, "Samer Albahra" notifications@github.com wrote:
Please add the following line to your TypeScript before referencing the plugin:
declare var networkinterface: any;
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/salbahra/cordova-plugin-networkinterface/issues/11#issuecomment-305989900, or mute the thread https://github.com/notifications/unsubscribe-auth/AGSCwpg8nW7AjQgB9zscLwki6vDwTZd4ks5sAZlsgaJpZM4H8Qtx .
Please share a code snippet that does not work. Something I can run and reproduce the issue your seeing.
declare var networkinterface:any;
@Component({
templateUrl: 'app.html'
})
export class MyApp {
public rootPage:any = HomePage;
platform.ready().then(() => {
networkinterface.getWiFiIPAddress(function(ip){
console.log(ip);
this.toast.show(ip, '2000', 'bottom').subscribe(
toast => {
console.log(toast);
});
});
}
Error :
ReferenceError: networkinterface is not defined.
In Mobile, Toast Notification is not coming , and in browser I am getting above error.
same as @dhavalshah007
I tried to use this plugin to get the local ip address. inside a angular2 (maybe also angular1) application the console shows a lot of errors. i figured out that "use strict" will be added by transpiler typescript or other javascript compilers. Is it possible to fix the plugin to work with "use strict"? Does someone has the same issue?