I'm using this code to bootstrap mi Angular app when I get the deviceReady event (or force it manuelly when testing in the browser):
var PhoneGapInit = function () {
this.boot = function () {
console.log("starting angular");
angular.bootstrap(document, ['cmmApp']);
};
if (window.cordova !== undefined) {
console.log("Found Cordova");
var _this = this;
document.addEventListener('deviceready', function() {
_this.boot();
});
} else {
console.log('PhoneGap not found, booting Angular manually');
this.boot();
}
};
//this start angular
angular.element(document).ready(function() {
new PhoneGapInit();
});
But I would like to create a loader and hide the "dirty & unstyled" html code before the app load. Any Idea on how to do this?
Thanks
You can do it with ng-cloak to hide elements before angular bootstrap app