What happens when filter is passed in pipe?


Can someone help me to understand why below subscription is not working.

  isLoggedIn1$:Observable<boolean> = of(false) // on subscribing it I get value as false

  isLoggedIn2$:Observable<boolean> = of(false).pipe(filter(value => Boolean(value))) // this one is not giving any value even it looks like subscribe is not getting called for this

Is there any documentation for this particular behavior?

as I understand it is being treated equivalent to EMPTY. but then why I am not getting type error for second one

Source: Angular Questions

Categorized as angular, rxjs Tagged ,


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us