I tried code from manual:
this.networkInterface.getWiFiIPAddress(function (ip) { alert(ip); });
this.networkInterface.getCarrierIPAddress(function (ip) { alert(ip); });
but fail compile & highlight error in IDE:
[ts] Expected 0 arguments, but got 1.
(method) NetworkInterface.getWiFiIPAddress(): Promise< string >
After call as promise:
this.networkInterface.getWiFiIPAddress().then(result => {
console.log(result);
});
result has type Object
{ip: 123.123.123, subnet: 255.255.255.0}
After call console.log(result.ip); I received “[ts] Property ‘ip’ does not exist on type ‘string’.”
how to use this plugin correctly?
thanks.