Angular 12 References/ Templates
🍀 Angular References

async pipe

Unwraps a value from an asynchronous primitive.

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.

Time: {{ time | async }}
export class AppComponent {
  time = new Observable<string>((observer: Observer<string>) => {
    setInterval(() => Date().toString()), 1000);
observable|async Time: Sat Jun 26 2021 20:55:40 GMT+0300 (за східноєвропейським літнім часом)
Links & Tutorials