Created
September 21, 2016 12:43
-
-
Save lotterfriends/53395722b063caafa5c2e34031c6a25c to your computer and use it in GitHub Desktop.
ionic view issue 29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
(function() { | |
angular.module('app.services').service('platformService', [ | |
function() { | |
var IONIC_APP_ID = 'xxx00xxx'; | |
this.isIonicWebView = function() { | |
return window.location.href.indexOf('com.ionic.viewapp') > -1 || window.location.href.indexOf(IONIC_APP_ID) > -1; | |
}; | |
this.isWeb = function() { | |
return angular.equals({}, ionic.Platform.device()) && !ionic.Platform.isWebView(); | |
}; | |
} | |
]); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
replace IONIC_APP_ID with your own app id