Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49076

How to get ionic.Platform.device().available to return false?

$
0
0

@commanderkeen wrote:

I can't seem to figure out how I was able to get ionic.Platform.device().available to return false when I was running in the browser. I just assumed that ionic.Platform.device() would always return empty in the browser because cordova isn't loaded so I was doing something like if(!angular.equals({}, ionic.Platform.device())) to detect if I was on a device and cordova was loaded.

I'm not sure when or how, but I noticed that .device() was actually returning an object now in the browser and had a property "available" that returned false. I was just playing with Ionic Analytics so I'm assuming it had something to do with that and possibly me adding the web platform client but I rolled back to an earlier commit and now I can't seem to get that back. I would much rather prefer to use that .available property if I can but I honestly have no idea where it came from.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49076

Trending Articles



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