Closed ashokkumar88 closed 8 years ago
Hey, you have to make 100% sure that Cordova's "deviceready" event is fired. If it doesn't the template/app won't work. Usually this is a problem if cordova.js is not properly included in html, so double check if you added this manually:
<script type="text/javascript" src="cordova.js"></script>
omg! I forgot to add cordova.js. It is working fine now. Thanks very much valnub. You saved my day.
should I assign the $scope variables this way?
MyApp.angular.controller('DetailPageController', ['$scope', '$http', 'InitService', function ($scope, $http, InitService) {
'use strict';
InitService.addEventListener('ready', function () {
// DOM ready
console.log('DetailPageController: ok, DOM ready');
$scope.test = 'testing';
// You can access angular like this:
// MyApp.angular
// And you can access Framework7 like this:
// MyApp.fw7.app
});
}]);
Yeah, looks good
But the $scope value is not showing in the view.
You need to set scope variables outside of the ready function:
MyApp.angular.controller('DetailPageController', ['$scope', '$http', 'InitService', function ($scope, $http, InitService) {
'use strict';
$scope.test = 'testing';
InitService.addEventListener('ready', function () {
// DOM ready
console.log('DetailPageController: ok, DOM ready');
// You can access angular like this:
// MyApp.angular
// And you can access Framework7 like this:
// MyApp.fw7.app
});
}]);
yeah! working fine. Thanks a lot.
You're welcome :)
I have almost completed a app using Onsen UI. Now I am thinking to switch to F7. Do you think that using F7 with Angular degrade the performance compare to without Angular?
Possible but not certain. Angular is not very well known for its performance. I don't know about Angular2 though, you might want to look into that.
ok. thanks
Hi, The blank template is working fine in local server. but when building it with cordova, the html is rendering but when I am clicking on any link nothing happens. No error in console.