Created
December 29, 2017 13:58
-
-
Save c-goosen/633d70c8ca3381247e854290aec8b4cc to your computer and use it in GitHub Desktop.
Disabling Ionic-Native plugins that won't work in ionic cordova emulate browser or ionic serve
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
//I import isApp on App start to detect whether or not its running in a browser. | |
// Useful during development. | |
// Usually works best with cordova platform browser | |
// ionic cordova platform add browser | |
// ionic cordova emulate browser -cl | |
// import { Platform } from 'ionic-angular/platform'; | |
// import { IsDebug } from '@ionic-native/is-debug'; | |
// TODO: Add more settings, detect cordova or not | |
console.log("\nSettings Being Loaded\n"); | |
// development on browser | |
export var isApp = !(!document.URL.startsWith('http') || document.URL.startsWith('http://localhost:8080')); | |
console.log("Ionic Running as App: " + isApp.toString()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment