angular.js doesn't work ng-view tag in PhoneGap

前端 未结 3 437
误落风尘
误落风尘 2020-12-30 11:52

I try to use angular.js with PhoneGap.It works fine at chrome browser.But it doesn\'t work
at ng-view tag.And angular module doesn\'t called when I run it on the simula

3条回答
  •  猫巷女王i
    2020-12-30 12:18

    Try the bootstrap api method to manually start the app on deviceReady. something like:

    function onDeviceReady() {
        ...
        angular.bootstrap(document, ['ngView']);
        ...
    }
    
    document.addEventListener("deviceready", onDeviceReady, true);
    

    http://docs.angularjs.org/api/angular.bootstrap

提交回复
热议问题