kstam / ng-scroll-repeat Goto Github PK
View Code? Open in Web Editor NEWAugmented Angular Repeat with infinite scroll functionality
License: MIT License
Augmented Angular Repeat with infinite scroll functionality
License: MIT License
I have a scrollable panel inside my page and I want to load more elements when I reach the bottom of the panel. Is there a way to set an arbitrary container instead pf the whole window?
@kstam is this compatible with angular 1.3.x? It doesn't seem to work for me
Can the scroll start in the middle and scroll both directions?
I don;t see anywhere .off
to remove the listener from DOM.
Awesome library. It is a great fit for our current project. Way better than ng-infinite scroll. I just love the fact that the display of the elements is only dependent of the html code. Beautiful!
I would like however to trigger an event in my main controller when the bottom of the page is hit.
If there is already a way to do that, could you tell me asap, since I am going to create this feature and do a pull request when it will be done and properly tested.
I planned to extract calculateScrollBottomDiff in another factory under ks.WindowService and tell the ngScrollRepeat directive to use it to still work properly.
Thanks again for your great lib!
I noticed that the directive is expecting all the json array items for scroll repeat to be available initially. But in my application initially the json array contains only 20 items. Then if I click 'Load More..' link I will bring another 20 items, as shown below
vm.loadMoreAPIs = function() {
vm.pageOffset = vm.pageOffset + vm.pageSize;
vm.bringItems();
};
As I can get nearly 10000 jsons in the the array. I don't want to brig all at a time.
I replaced the above code in controller as,
$scope.$on('bottom-reached-before', function() {
// do whatever you want
vm.loadMoreAPIs();
});
But after reaching the end of page through scrolling, new ajax call is not getting fired and my page always shows only first 20 items even after scrolling to the end of page. Is there any fix for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.