Skip to content

Declare variables for blocks in your Angular templates.

Notifications You must be signed in to change notification settings

corradodellorusso/ngx-let

Repository files navigation

NgxLet

Declare variables for blocks in your Angular templates.

Example

  <!-- Without ngx-let -->
  <div>Name: {{ (person$ | async).name }}</div>
  <div>Age: {{ (person$ | async).age }}</div>

  <!-- With ngx-let -->
  <ng-container *ngxLet="person$ | async as person">
    <div>Name: {{ person.name }}</div>
    <div>Age: {{ person.age }}</div>
  </ng-container>

Usage

import { NgxLetModule } from 'ngx-let';

@NgModule({
    ...
    imports: [
        NgxLetModule
    ]
    ...
})
export class YourModule {
}

About

Declare variables for blocks in your Angular templates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published