Window.plugin is always undefined

I’m getting window.plugin as undefined all the time. I’ve tried both ionic.Platform.ready() and $ionicPlatform.ready() but still no luck :frowning:

 $ionicPlatform.ready(function() {
    if (window.plugin) 
      var div = document.getElementById("map_canvas");

I/Web Console(10313): undefined at file:///android_asset/www/js/app.js:15

Thats because your browsers does not support the window plugins, if you launch it on your device it probably will

you could take a look at Ripple emulator for chrome on desktop:

But i recommend testing on real devices really, ripple is great, but it kinda sucks if you comapre it to real devices

Actually I’ve tried it on my andrdoid device and I got this error using logcat.

Oh strange, i’ll try to recreate the bug.