Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. loadPeople() {
  2.  
  3. return new Promise(resolve => {
  4.  
  5. this.dataProvider.getProducts().subscribe((products) => {
  6. this.start;
  7. this.products = products;
  8. this.AKey = products.pop().$key;
  9.  
  10. console.log(products);
  11. for(let person of products) {
  12. this.people.push(person);
  13. }
  14.  
  15. resolve(true);
  16.  
  17. });
  18.  
  19. });
  20.  
  21. }
  22.  
  23. doInfinite(infiniteScroll:any) {
  24. console.log('doInfinite, start is currently '+this.start);
  25. this.start+=50;
  26.  
  27. this.loadPeople().then(()=>{
  28. infiniteScroll.complete();
  29. });
  30.  
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement