Angular 4 with ngx infinite scroll
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