Ich versuche Netzwerk api in ionic2, Ionic-native docs Beispiel zu verwenden, funktioniert nicht: Mein Code ist:Netzwerkstatus in Ionic-native, ionic2 Fehler
import { Network } from 'ionic-native';
networkType:string;
constructor() {
// watch network for a connection
let connectSubscription = Network.onConnect().subscribe(() => {
this.networkType = Network.type;
});
}
Ich bin Fehler immer Property 'type' does not exist on type 'typeof Network'.
Wenn eine man hat erfolgreich Ionic-native in ionic2 verwendet, bitte helfen.
Ich habe ionic plugin add cordova-plugin-network-information
getan
ich das hatte, bis ich auf die neueste Version von Ionic-Native (2.2.16) aktualisiert funktionieren. Mein Netzwerk-Plugin ist Version 1.3.1. Nachdem ich das gesagt habe, habe ich Probleme, das onConnect-Abonnement in Brand zu setzen. – Astravagrant