Reputation: 2933
I want to show a loader untill all css, js files are loaded. I want to do this using angularJs. Can anyone give me solutions for this problem ? How can detect all js, css files loaded using angularjs ?
Thanks in advance
Upvotes: 0
Views: 85
Reputation: 2933
I have found a solution & it works for me.
angular.module().run(function(){
angular.element(document).ready(function(){
/* Loaders code will be here */
})
})
Upvotes: 0
Reputation: 34914
Display you loader image initially and hide here
$scope.$on('$viewContentLoaded', function() {
//Code to hide loader
});
Upvotes: 1
Reputation: 181
I would recommend using this plugin. Angular-loading bar will show a loading bar until everythnig loads.
Upvotes: 0