Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mapItem(item: any)
- {
- //do something
- }
- mapItems(items: any[])
- {
- for (const item of items)
- this.mapItem(item);
- }
- callServer()
- {
- return this.httpServer.get(url).map(this.mapItems);
- }
- import { map } from "rxjs/operators";
- callServer()
- {
- return this.httpServer.get(url).pipe(map(this.mapItems));
- }
Add Comment
Please, Sign In to add comment