ionic+cordova平台

2017-03-13  本文已影响0人  AnneyLiu

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

上一篇下一篇

猜你喜欢

热点阅读