https://github.com/basu-dev/ng-property
Use Angular without zonejs with @Property() decorator.
https://github.com/basu-dev/ng-property
Last synced: 12 days ago
JSON representation
Use Angular without zonejs with @Property() decorator.
- Host: GitHub
- URL: https://github.com/basu-dev/ng-property
- Owner: basu-dev
- Created: 2021-09-03T16:53:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T16:54:08.000Z (almost 5 years ago)
- Last Synced: 2025-10-31T04:54:47.250Z (8 months ago)
- Language: TypeScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```bash
npm install ng-property --save
```
## Example
```ts
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