@ngx-utilities/observe-property
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @ngx-utilities/observe-property

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

50.6 kB

Total Files

20

Last publish

Collaborators

  • kevinphelps