# LazyDirective

## Selectors

```
[lazy]
```

## Properties

| Property                                                                        | Description |
| ------------------------------------------------------------------------------- | ----------- |
| <p>@Input()</p><p><strong>lazy</strong>: string</p>                             |             |
| <p>@Input()</p><p><strong>lazyLoadChildren</strong>: string</p>                 |             |
| <p>@Input()</p><p><strong>lazyActivate</strong>: (component: any) => void</p>   |             |
| <p>@Input()</p><p><strong>lazyDeactivate</strong>: (component: any) => void</p> |             |
| <p>@Output()</p><p><strong>activate</strong>: EventEmitter&#x3C;any></p>        |             |
| <p>@Output()</p><p><strong>deactivate</strong>: EventEmitter&#x3C;any></p>      |             |

## Example

```markup
<ng-container *lazy="let component
  loadChildren 'src/app/view/lazy/lazy.module#LazyModule';
  activate activate; deactivate deactivate
">${NG_CONTENT}</ng-container>
```

```markup
<ng-template let-component [lazy]="'src/app/view/lazy/lazy.module#LazyModule'"
  (activate)="activate($event)" (deactivate)="deactivate($event)"
>${NG_CONTENT}</ng-template>
```

[See more](../features/lazy)
