# AsyncDirective

## Selectors

```
[async]
```

## Properties

| Property                                                                | Description       |   |
| ----------------------------------------------------------------------- | ----------------- | - |
| <p>@Input()</p><p><strong>async</strong>: Observable\<any>              | Promise\<any></p> |   |
| <p>@Input()</p><p><strong>asyncFrom</strong>: Observable\<any>          | Promise\<any></p> |   |
| <p>@Input()</p><p><strong>asyncNext</strong>: (value: any) => void</p>  |                   |   |
| <p>@Input()</p><p><strong>asyncError</strong>: (error: any) => void</p> |                   |   |
| <p>@Input()</p><p><strong>asyncComplete</strong>: () => void</p>        |                   |   |
| <p>@Output()</p><p><strong>next</strong>: EventEmitter\<any></p>        |                   |   |
| <p>@Output()</p><p><strong>error</strong>: EventEmitter\<any></p>       |                   |   |
| <p>@Output()</p><p><strong>complete</strong>: EventEmitter\<any></p>    |                   |   |

## Example

```markup
<ng-container *async="let data from source;
  next next; error error; complete complete
">{{ data }}</ng-container>
```

```markup
<ng-template let-data [async]="async"
  (next)="next($event)" (error)="error($event)" (complete)="complete($event)"
>{{ data }}</ng-template>
```

[See more](https://ngxf.gitbook.io/platform/server-interaction/async)
