Proper approach for Async Pipe


I’m building an Angular app and trying to use the async pipe whenever possible to handle Observable suscriptions.

I’m still to exactly sure of when and why I should use it, most of the time I’ve seen that if I don’t need to make any changes to the coming data I can just use it and show the data as-is; but if I need to to something to any piece of the data beforehand I should manually subscribe in my typescript code and handle everything there before displaying it.

So for example if I have an array of objects and I need to manipulate a string in one of the object’s properties it would be better to manually subscribe, handling the response and then displaying that in my template.

Is this assumption correct?

Source: Angular Questions

Categorized as angular, javascript, observable, typescript 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