【问题标题】:Cordova plugin network information not workingCordova 插件网络信息不起作用
【发布时间】:2018-12-24 19:50:26
【问题描述】:

我已关注https://ionicframework.com/docs/native/network/,但在连接或断开网络时未触发。不在浏览器、开发应用和手机中。

我已检查此链接https://forum.ionicframework.com/t/cordova-plugin-network-information-not-working/99271 并检查https://www.youtube.com/watch?v=U9nVMSMimRQ

这是我的开发环境

Ionic Framework: 3.9.2
Ionic App Scripts: 3.2.0
Angular Core: 5.2.11
Angular Compiler CLI: 5.2.11
Node: 10.13.0
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

【问题讨论】:

    标签: ionic-framework ionic3 ionic-native


    【解决方案1】:

    添加一些你所做的代码库以获得更多帮助。

    还可以在平台就绪和测试下添加您的代码。

    *在此之前导入平台服务。

    this.platform.ready().then(() => {
            //Code
    });
    

    【讨论】:

    • 我已经在“app.components.ts”中尝试过这个,我们有“this.platform.ready().then(()”...但没有成功:(
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-06-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多