angular.js не работает тег ng-view в PhoneGap
Я пытаюсь использовать angular.js с PhoneGap. Он отлично работает в браузере Chrome. Но это не такт работа
в теге ng-view. И угловой модуль неТ звонил, когда я запускаю его на симуляторе. Есть ли у вас какие-либо идеи?
Мой код такой.
index.html
Welcome!
app.initialize();
index.jsrouter.jsvar app = { initialize: function() { this.bind(); }, bind: function() { document.addEventListener('deviceready', this.deviceready, false); }, deviceready: function() { // note that this is an event handler so the scope is that of the event // so we need to call app.report(), and not this.report() app.report('deviceready'); }, report: function(id) { console.log("report:" + id); // hide the .pending <p> and show the .complete </p>
document.querySelector('#' + id + ' .pending').className += ' hide'; var completeElem = document.querySelector('#' + id + ' .complete'); completeElem.className = completeElem.className.split('hide').join(''); } };
angular.module("app",[]).
config(["$routeProvider",function($routeProvider){
$routeProvider.when("/",{templateUrl:"templates/home.html"});
}]);