nginfinitescroll

Angular binding not working properly with ngInfiniteScroll

本秂侑毒 提交于 2020-01-03 19:01:19
问题 Basically I have a timeline with posts that is a $firebaseArray and any change to this array is getting binded properly. But when I want to bind any other data it only binds when ngInfiniteScroll is trying to retrieve more data from firebase, so only when I scroll down. In the code bellow I'm calling {{getMoreDetails()}} and this data is binded when the first set of data is being retrieved with ngInfiniteScroll but as soon as it is loaded the bind breaks and only binds again when scrolling.

How to prevent ngInfiniteScroll from being triggered multiple times after the initial trigger?

陌路散爱 提交于 2020-01-02 04:06:24
问题 I am using ngInfiniteScroll to enable infinite scrolling on my website. It works partly as expected, once I scroll to the bottom of the page it calls the method I want it to call to show more posts, except that it keeps calling posts without end after it is triggered once. Does anybody know what could be causing this? This is what my code looks like where I am implementing ngInfiniteScroll, I don't know that this specific code will help much though. I suspect it is getting thrown off by code

Angular 4 with ngx infinite scroll

梦想的初衷 提交于 2019-12-20 15:26:39
问题 I am trying to add an infinite scroll with ngx-infinite-scroll in my Angular 4 project. The array data has about 800 posts which are from API. Initially, I want to display 20 posts and every single time the page is scrolled, it will display 20 more posts. Currently, I can see the console log message (scrolled!) whenever I scroll down. But I can't figure out how to append 20 posts into the table when it's scrolled. This is the codes that I am trying. onScrollDown function onScrollDown(){ this

ngInfiniteScroll - loadMore() method gets called on every mouse-scroll

别说谁变了你拦得住时间么 提交于 2019-12-20 09:52:49
问题 Solution below on the comments. Problem : My loadMore() method gets executed on every container's scroll. Meaning : loadMore() gets executed on each mouse scroll of the parent container ( infinite-scroll-parent="true" ) Desired result : to get loadMore() execute only when infiniteScrollDistance meets its conditions, instead of any tinny scroll I do. My code is highly inspired by the demo_basic & demo_async. My app is a photos gallery. I load the photos by ajax call, and populate them into a

Angular 4 with ngx infinite scroll

旧城冷巷雨未停 提交于 2019-12-03 09:02:30
I am trying to add an infinite scroll with ngx-infinite-scroll in my Angular 4 project. The array data has about 800 posts which are from API. Initially, I want to display 20 posts and every single time the page is scrolled, it will display 20 more posts. Currently, I can see the console log message (scrolled!) whenever I scroll down. But I can't figure out how to append 20 posts into the table when it's scrolled. This is the codes that I am trying. onScrollDown function onScrollDown(){ this.dataService.getPosts().subscribe((posts)=>{ for (let post of posts){ let data = '<tr><td>'+ post.title

Using Infinite scroll in angularjs and jade

左心房为你撑大大i 提交于 2019-11-30 21:50:02
问题 I'm using angularjs infinite scroll in my dashboard web app. I have a single page which holds multiple infinite scrollable widgets. Since I want to have an infinite scroll for each of them I decided to use this directive but somehow it's not working as expected. I want the infinite scroll to work relative to the inner content div scrollbar which uses perfect scrollbar instead of main browser window. I have searched on google and found multiple threads explaining 2 new variables which can be

Angular 4: Infinite scroll not working

♀尐吖头ヾ 提交于 2019-11-30 09:05:00
I have tried using ngx-infinite-scroll ( https://www.npmjs.com/package/angular2-infinite-scroll ) and also some other directives but none seem to work. package.json "dependencies": { "@angular/animations": "^4.0.2", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/compiler-cli": "^4.0.2", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/platform-server": "^4.0.2", "@angular/router": "^4.0.0", "absurd": "^0.3.8", "angular2-masonry": "^0.4.0",

Angular 4: Infinite scroll not working

懵懂的女人 提交于 2019-11-29 12:20:00
问题 I have tried using ngx-infinite-scroll (https://www.npmjs.com/package/angular2-infinite-scroll) and also some other directives but none seem to work. package.json "dependencies": { "@angular/animations": "^4.0.2", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/compiler-cli": "^4.0.2", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/platform

angularjs infinite scroll in a container

谁都会走 提交于 2019-11-27 11:47:18
I'm trying to use angularjs infinite scroll It seems to work only if the scroll is relative to the browser window. I would like to do infinite scroll in an inner DIV, i.e. I have a page with a generic wrapper and an inner div for displaying the actual content. The wrapper page is set to elapse the entire window, thus it is never scrollable. but the inner div that contain content, has its own scroll bar. How to I get the infinite scroll to work relative to the inner content div scrollbar? In case anyone searches the same and comes here - here are usefull links: https://github.com/BinaryMuse

angularjs infinite scroll in a container

二次信任 提交于 2019-11-26 15:45:36
问题 I'm trying to use angularjs infinite scroll It seems to work only if the scroll is relative to the browser window. I would like to do infinite scroll in an inner DIV, i.e. I have a page with a generic wrapper and an inner div for displaying the actual content. The wrapper page is set to elapse the entire window, thus it is never scrollable. but the inner div that contain content, has its own scroll bar. How to I get the infinite scroll to work relative to the inner content div scrollbar? 回答1: