Tutorial by Examples: asyncpipe

import { Component } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/of'; @Component({ selector: 'async-stuff', template: ` <h1>Hello, {{ name | async }}</h1> Your Friends are: <ul> <li *ngFor=&quot...
The async pipe subscribes to an Observable or Promise and returns the latest value it has emitted. When a new value is emitted, the async pipe marks the component to be checked for changes. When the component gets destroyed, the async pipe unsubscribes automatically to avoid potential memory leaks. ...

Page 1 of 1