Ionic 3 - network-information plugin - Object(…) is not a function(…)

前端 未结 2 1535
挽巷
挽巷 2021-01-22 20:37

I need to implement network information plugin in an ionic 3 angular 4 project. I have installed a network plugin using

$ ionic cordova plugin add cordova-plugin         


        
2条回答
  •  自闭症患者
    2021-01-22 21:07

    Since the release of Ionic 4, Installing Ionic Native for Ionic 3 requires you to add @4 to get the latest compatible version. In this case, and all others involving Ionic 3, you should do it like this

    npm install @ionic-native/network@4
    

    for network,

    npm install --save @ionic-native/barcode-scanner@4 
    

    for Barcode Scanner,

    npm install --save @ionic-native/network@4, 
    npm install --save @ionic-native/bluetooth-le@4 
    

    for BluetoothLE.

提交回复
热议问题