RxJs is a really powerful library for doing reactive programming and working with data. Like any powerful library though we run into issues that might make us scratch our head if we haven’t seen before.

Say for example have a method in a service or controller in Angular that needs to return some data from an inner or nested subscribe.

If we try and do it like this, the method will try and return a subscription to the observable when we’re trying to return an observable with real data.

There are a few different ways to fix this, but…

Taylor Ackley

Developer at Knowledge Anywhere

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store