Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

How cordova plugins work in ionic 2?

$
0
0

Hi,
I am having trouble using cordova plugins.
Trying to use cordova-plugin-ble-central https://github.com/don/cordova-plugin-ble-central
I add the plugin with

ionic plugin add cordova-plugin-ble-central

I am not sure how I should be access the global variable "ble"

platform.ready().then(() => {
  ble.enable(
      function() {
        this.log = "Bluetooth is enabled";
      },
      function() {
          this.log = "The user did *not* enable Bluetooth";
      }
  );
});

}
}

I should mention that I am using a Ionic2 typescript project.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>