ng-property
v0.0.2
Published
A decorator which empowers a normal property to cause change detection when its value is changed.
Downloads
22
Maintainers
Readme
ng-property
Cause change detection in angualar when the property value is changed without Zone.
It is my first try to use angular without zonejs using a Property() decorator which causes change detection to run when the property value is set.
Installation
npm install ng-property --save
Example
export class AppComponent implements OnInit {
a: number = 0;
@Property() b: number = 0;
// do not cause change detection
incrementA() {
this.a++;
}
//causes change detection
incrementB() {
this.b++;
}
}
Further
Implement Immutability
Use Reference Check for objects