I am trying to take advantage of observables in angular2 and got confused on why should i use map()
over subscribe()
.
Suppose i am getting values f
You need subscribe
to run your async request. If you just set map
- no requests will trigger. You can check.
Good practice to use map
to preproccess you data because many subscribers can comsume your results. So instead of adding preprocessing to each client (subscriber) you can prepare single output with single data schema for all.