@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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.21latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.21
0.0.11

Package Sidebar

Install

npm i @ngx-utilities/observe-property

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

50.6 kB

Total Files

20

Last publish

Collaborators

  • kevinphelps