Show loading animation for slowscript using AngularJS?

前端 未结 8 538
野的像风
野的像风 2020-12-24 12:08

In angularjs 1.2 operations like filtering an ng-repeat with many rows (>2,000 rows) can become quite slow (>1 sec).
I know I can optimize execution times u

8条回答
  •  春和景丽
    2020-12-24 12:52

    You can use this code taken from this url: http://www.directiv.es/angular-loading-bar

    there you can find a workin demo also.

    Here is thei code:

        
    
    
        
        angular-loading-bar example
        
        
    
    
        
        
    • {{person.lname}}, {{person.fname}}

    How do I use it?

    Install it via npm or bower

    $ npm install angular-loading-bar
    $ bower install angular-loading-bar
    

    To use, simply include it as a dependency in your app and you're done!

    angular.module('myApp', ['angular-loading-bar'])
    

提交回复
热议问题