AngularJS: How to show preload or loading until page is loaded completely?

后端 未结 6 671
太阳男子
太阳男子 2021-02-01 09:49

I\'ve an image gallery site where I\'m getting all images and image related data from the database as json format in my controller and then by using ng-repeat I\'m binding them

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 10:21

    While @chotesah answer is just right I can suggest you go another way and use preloaders for each image (something like Facebook on page load).

    Try this module. You'll need to change few lines:

    // Add module dependency   
    angular.module('app', ['angular-preload-image']);
    …
    
    

    After that look for nifty image preloaders at codrops.

提交回复
热议问题