I try to make correct view loading app.
HTML:
<body>
<loading outerWidth='1000' outerHeight='1000' display='isReady'></loading>
<div class='wrapper' ng-show='isReady'>
</div>
</dody>
JS:
app.run(['$rootScope', '$state', '$stateParams', '$location', '$http', 'userData', function($rootScope, $state, $stateParams, $location, $http, userData) {
$rootScope.isReady = false;
$http.post('services/enter.php', {
}).then(function(response) {
$rootScope.isReady = true;
});
}]);
Basic idea: when app loading show some image/loading gif 'please wait'. Next post request to get data and after request show html. But I have problem to manipulate html from app.rum functiuon - I try use $rootScope. Need suggestions how I can do it better.