Guest User

Untitled

a guest
Mar 18th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. mapItem(item: any)
  2. {
  3. //do something
  4. }
  5.  
  6. mapItems(items: any[])
  7. {
  8. for (const item of items)
  9. this.mapItem(item);
  10. }
  11.  
  12. callServer()
  13. {
  14. return this.httpServer.get(url).map(this.mapItems);
  15. }
  16.  
  17. import { map } from "rxjs/operators";
  18.  
  19. callServer()
  20. {
  21. return this.httpServer.get(url).pipe(map(this.mapItems));
  22. }
Add Comment
Please, Sign In to add comment