two-way-decorator
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

two-way-decorator

Angular Two Way Data Binding Decorator

Usage:

import { Component, OnInit } from '@angular/core';
import { TwoWay } from 'two-way-decorator';
 
@Component({
  selector: 'app-example',
  templateUrl: './example.component.html',
  styleUrls: ['./example.component.scss']
})
export class ExampleComponent {
 
  @TwoWay()
  public text: string;
 
  @TwoWay()
  public count: number;
 
}

Then just use the binding like this in the parent template

  <app-example [(text)]="anyText" [(count)]="anyCount"></app-example>

Made with pure TypeScript and @angular/core.

Author: Sergiu Uifalean

Readme

Keywords

Package Sidebar

Install

npm i two-way-decorator

Weekly Downloads

8

Version

0.2.2

License

MIT

Unpacked Size

34 kB

Total Files

21

Last publish

Collaborators

  • uifi95