I am trying to map from a service call but getting an error.
Looked at subscribe is not defined in angular 2? and it said that in order to subscribe we need to
I was also facing the same issue when i was calling a method inside switchMap, apparently I found that if we use method inside switchMap it must return observable.
i used pipe to return observable and map to perform operations inside pipe for an api call which i was doing inside method rather than subscribing to it.