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

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

Last updated 6 years ago

See more