This is a two part question:
I am using the resolve property inside $stateProvider.state() to grab certain server data before loading the controller. How wo
This is loader for globally when page navigate between any state (any page), put in app.js
.run(
['$rootScope',
function($rootScope) {
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
$rootScope.preloader = true;
})
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
$rootScope.preloader = false;
})
}
])
In html:
Loading...