Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  var x = this.af.list('/pedidos/', ref => ref.limitToLast(1500));
  2.   x.snapshotChanges().pipe(
  3.       map(actions =>
  4.         actions.map(a => ({key:a.key, ...a.payload.val()}))
  5.        
  6.         )
  7.     ).subscribe(items => {
  8.  
  9.  
  10.       })
  11.  
  12.  
  13.  
  14.       this.dataSource = new MatTableDataSource(items);
  15.       this.dataSource.paginator = this.paginator;
  16.       this.dataSource.sort = this.sort;
  17.        
  18.       });
  19.  
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement