0.0.2 • Published 5 years ago

@ngx-utilities/observe-property v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

observe-property

npm version

The ObserveProperty decorator allows you create a changes observable for any class propery. This is especially useful for Angular @Input() properties.

Installation

To install this library, run:

npm install @ngx-utilities/observe-property --save -or- yarn add @ngx-utilities/observe-property

Usage

import { ObserveProperty } from '@ngx-utilities/observe-property';

class Person {
  firstName: string;
  lastName: string;

  @ObserveProperty('firstName') readonly firstNameChanges: Observable<string>;
  @ObserveProperty('lastName') readonly lastNameChanges: Observable<string>;
}

License

MIT © Kevin Phelps

0.0.2

5 years ago

0.0.1

5 years ago