AsyncDirective

Selectors

[async]

Properties

Property

Description

@Input()

async: Observable<any> | Promise<any>

@Input()

asyncFrom: Observable<any> | Promise<any>

@Input()

asyncNext: (value: any) => void

@Input()

asyncError: (error: any) => void

@Input()

asyncComplete: () => void

@Output()

next: EventEmitter<any>

@Output()

error: EventEmitter<any>

@Output()

complete: EventEmitter<any>

Example

<ng-container *async="let data from source;
  next next; error error; complete complete
">{{ data }}</ng-container>
<ng-template let-data [async]="async"
  (next)="next($event)" (error)="error($event)" (complete)="complete($event)"
>{{ data }}</ng-template>

See more

Last updated