ionic+cordova平台

cordova平台

if(window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard){}

document.addEventListener("deviceready",function(){},false);


ionic平台

ionic.Platform.ready(function(){

// will execute when device is ready, or immediately if the device is already ready.

});

vardeviceInformation=ionic.Platform.device();

varisWebView=ionic.Platform.isWebView();

varisIPad=ionic.Platform.isIPad();

varisIOS=ionic.Platform.isIOS();

varisAndroid=ionic.Platform.isAndroid();

varisWindowsPhone=ionic.Platform.isWindowsPhone();

varcurrentPlatform=ionic.Platform.platform();

varcurrentPlatformVersion=ionic.Platform.version();

ionic.Platform.exitApp();// stops the app

你可能感兴趣的:(ionic+cordova平台)