angular


Angular 4: Infinite scroll not working


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",
"animate.css": "^3.5.2",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"jquery": "^3.2.1",
"jquery-slimscroll": "^1.3.8",
"metismenu": "^2.7.0",
"ng2-bs3-modal": "^0.10.4",
"ngx-infinite-scroll": "^0.5.1",
"rxjs": "^5.1.0"
}
user.component.html
<div class="row" infiniteScroll [infiniteScrollDistance]="0"
[infiniteScrollThrottle]="300" (scrolled)="loadMore()">
<div class="col-md-3 col-sm-4" *ngFor="let user of userList">
<span>{{user.name}} ({{user.email}})</span>
</div>
</div>
user.module.ts
The import is done
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
#NgModule({
imports: [
CommonModule,
FormsModule,
InfiniteScrollModule
],
declarations: [UserComponent],
providers: [],
exports: [],
})
export class UserModule { }
user.component.ts
export class UserComponent {
constructor() {}
loadMore() {
console.log('method begins');
}
}
Tried using host listener as well but the scroll event just doesn't seem to occur.
Has it got anything to do with the class i'm using on which the infinite scroll is applied?

Related Links

angular2 input not self close
Angular 2 pipe triggering
Bootstrap the same angular2 module multiple times in a page
Performance Angular 2 is low - test [closed]
Page Navigation Issues ionic2 and angular2
Angular 2 remove properties prefixed with dollar sign ($) from objects
In angular2 how can I import Router Segment so I can use getParam function
In angular2 how can I do a select list using ngModel
Angular 2 disable XSRFStrategy for a single service or per request
Which preferences do I need, to get angular2 worked with Visual Studio 2013?
ng-bootstrap Datepicker current date like placeholder
ng2-tag-input separatorKeys not working
Parser Error: Got interpolation ({{}}) where expression was expected
Angular 2 - test for change in route params
Angular 2 RxJS Observable not loading
Angular 2 - dynamic “for” attribute in ngFor [duplicate]

Categories

HOME
rstudio
qt5
ruby-on-rails-4
amazon-dynamodb
function
ignite
analytics
monitoring
chromium
wlan
jboss-eap-6
ais
fontforge
snapshot
google-play-games
logstash-grok
video-processing
shogun
jxmaps
spring-data-elasticsearch
border
spring-boot-actuator
moshi
xbuild
apache-samza
entity-relationship
mpeg
bus
android-logcat
required
reactive-streams
gulp-4
tablet
fixtures
tail-recursion
nn
interactive
fancytree
oclazyload
cartography
getelementsbyclassname
sqlitestudio
docker-registry
ember-cli-mirage
google-api-v3
date-formatting
spring-social-facebook
svg-edit
spock-reports
swig-template
kindle
display-bugs
rational-team-concert
nibble
google-roads-api
lg
stompjs
xcode-bots
html5builder
openembedded
file-attributes
navigationbar
string-search
n-tier
mathgl
groff
httpwatch
opendocument
factoring
styledtext
countries
inter-process-communicat
problem-steps-recorder
uipicker
panning
facebook-events
mdbtools
actinic
expandoobject
pasteboard
windows-live-writer
vtl
multiple-versions
urldecode
vmwaretasks
trackback

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App