NGXF
  • 🚀Introduction
  • Get Started
    • Why
    • Installation
  • Concepts
    • Introduction
  • Features
    • Activated Route
    • Call
    • Init
    • Lazy
    • Keep Alive
    • Timeout
    • Track By Key
    • Repeat
    • Virtual Scroll
  • Server Interaction
    • Async
    • Cookies
    • Http
    • Socket.IO
  • Hooks
    • State Hook
    • Effect Hook
    • Reducer Hook
  • Recompose
    • Compose
  • API
    • NgxfModule
    • HttpDirective
    • RouteDirective
    • InitDirective
    • ComposeDirective
    • ReturnDirective
    • TimeoutDirective
    • CookiesDirective
    • AsyncDirective
    • LazyDirective
    • CallPipe
  • Recipes
    • Caching
    • Style Guide
  • Community
    • FAQ
    • Contributing
Powered by GitBook
On this page
  • Selectors
  • Properties
  • Example
  1. API

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>
PreviousCookiesDirectiveNextLazyDirective

Last updated 6 years ago

See more