LazyDirective

Selectors

[lazy]

Properties

Property

Description

@Input()

lazy: string

@Input()

lazyLoadChildren: string

@Input()

lazyActivate: (component: any) => void

@Input()

lazyDeactivate: (component: any) => void

@Output()

activate: EventEmitter<any>

@Output()

deactivate: EventEmitter<any>

Example

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

See more

Last updated