How to debug on whether observable is unsubscribe

Viewed 8025

how can i test whether the observable is unsubscribe after subscription. I am developing in ionic2/angular2.

I am expecting typing something like this in chrome developer mode and it will return value: observableName.isSubscribe()

2 Answers

As sebaferreras told in the last comment, you can just use the closed property;

So, for example:

const sub$ = new Subject();
sub$.unsubscribe();
sub$.closed //true;
Related