How do I implement progressive loading of content as you scroll down the page? Otherwise 1000 images would load at the same time.
相关问题
- angularJS: ui-router equivalent to $location.searc
- Separate AngularJS Controllers Into Separate Files
- Angular ngAnimate not working first time on page l
- Ionic Spinner not showing up
- Upload file to Google Cloud Storage using AngularJ
相关文章
- Passing variable through URL with angular js
- Watch entire object (deep watch) with AngularJS
- Angular ng-if change span text
- Can ng-show directive be used with a delay
- AngularJS $routeParams vs $stateParams
- Multiple parameters in AngularJS $resource GET
- How to set class/style of accordion heading in Ang
- PUT to S3 with presigned url gives 403 error
I've created a module that does roughly the same as ngInfiniteScroll, but does not depend on jQuery. It does take window resizing into account. ngInfiniteScroll wasn't performing properly in my application so I've build my own and it's a lot lighter.
https://github.com/Bram77/su-endless-scroll
Ben Nadel has a good solution for this, where he takes in account both window and document resizing. He also avoids a repaint after every ng-repeat node. Check it out.
I didn't want to use
ngInfiniteScroll
the other guy posted as my mobile app does not use jQuery so there is no point in loading it just for this.Anyhow, I found a jsfiddle with pure Javascript that solves this problem.
HTML
JavaScript
Source: http://jsfiddle.net/vojtajina/U7Bz9/
Use infinite scrolling directive. ngInfiniteScroll
DEMO
HTML
JS