Maybe something like the following
<div class="loadingScreen" ng-show="!isLoaded">
<div>Loading...</div>
</div>
<div class="container ng-hide" ng-show="isLoaded" >
Page Content
</div>
Js
angular.module('myApp').controller("itemController", function($scope, itemService){
$scope.isLoaded = false;
...Other stuff down here...
itemService.getItems().success(function(data){
$scope.isLoaded = true;
});
}
CSS
.loadingScreen{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: white;
text-align: center;
-webkit-transform-style: preserve-3d;
}
.loadingScreen > div{
position: absolute;
top: 47%;
left: 47%;
}
source
share