Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Consuming Observables using async pipe

Consuming Observables Using Async Pipe
To consume an Observable using async pipe we need to use the | async syntax in the components view template. In the previous post, we saw how to consume an Observable (response from a http API call) by subscribing to the Observable.

The view template consumes this Observable and displays the response from the http call in the View template. The async pipe automatically subscribes and unsubscribes to the Observable, whenever a new value is emitted from the Observer the async pipe automatically detects the change and refreshes the component.


This post first appeared on C# Guide, please read the originial post: here

Share the post

Consuming Observables using async pipe

×

Subscribe to C# Guide

Get updates delivered right to your inbox!

Thank you for your subscription

×