ngx-let-directive
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

NgxLetDirective

This directive helps to store value to a local variable to be bound in the template.

The directive works with Angular 5 and 6. To use it in Angular 4, you may import the .ts file directly (see Usage). For Angular 2, you may try it in Angular 4's way, but it's not tested.

Usage

1.Install ngx-let-directive.

npm i -S ngx-let-directive

2.Import NgxLetDirectiveModule to your Angular module.

Angular 4

import { NgxLetDirectiveModule } from 'ngx-let-directive/src';
@NgModule({
  imports: [
    ...
    NgxLetDirectiveModule,
    ...
  ],
  ...

Angular 5+

import { NgxLetDirectiveModule } from 'ngx-let-directive';
@NgModule({
  imports: [
    ...
    NgxLetDirectiveModule,
    ...
  ],
  ...

3.Add the "*let" attribute to an element or ngContainer.

<div *let="userObservable | async as user">
  Hello {{user}}!
</div>

4.Version History

1.0.1 unable-to-rebind bug fixed 1.0.0 initial version


Good luck.

Package Sidebar

Install

npm i ngx-let-directive

Weekly Downloads

13

Version

1.0.1

License

MIT

Unpacked Size

38.8 kB

Total Files

27

Last publish

Collaborators

  • kingmario