npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-propserve

v0.1.8

Published

Tiny library that provides a small set of decorators to interact with Angular input attributes.

Readme

npm version

ngx-propserve

ngx-propserve let's you subscribe to changes of Angular's @Input properties.

Usage

ObservableInput

Using the @ObservableInput decorator, you can define a @Input property that works as an Observable and informs you automatically about its changes.

@Component({
  selector: 'app-test',
  template: `
    <ng-container *ngIf="foo$ | async as result">
      {{ result * 2 }}
    </ng-container>
  `
})
class TestComponent {
  @ObservableInput<number>('foo') foo$!: Observable<number>;
}

This example defines an @ObservableInput called foo$ that subscribes to the changes of an @Input named foo. The property foo is created automatically in the @ObservableInput decorator. Thus, no additional work is needed and the TestComponent can be used as follows:

<app-test [foo]="2"></app-test>

ngx-propserve enables the developer to follow the so called SIP Principle, without having to re-define additional logic for the input source streams of the component. Using @ObservableInput for source streams, the intermediate and presentation streams can be easily mapped. For instance:

@Component({
  selector: 'app-test',
  template: `
    <span *ngIf="name$ | async as name">{{ name }}: </span>
    <span *ngIf="message$ | async as message">{{ message }}</span>
  `
})
class TestComponent {
  @ObservableInput<number>('price') price$!: Observable<number>;
  @ObservableInput<string>('name') name$!: Observable<string>;

  message$ = combineLatest(this.price$, this.name$).pipe(
    map(([price, name]) => `${name} costs ${price}`)
  )
}

@ObservableInput doesn't compile out-of-the-box when using the AOT compiler, since the creation of the @Input decorator is done implicitly. You could define your module schema as NO_ERRORS_SCHEMA and it will ignore the input binding errors.

AsObservable

ngx-propserve includes the @AsObservable decorator that can transform existing properties of a class into an Observable listener. For instance:

@Component({
  selector: 'app-test',
  template: `
    <span *ngIf="name$ | async as name">{{ name }}: </span>
    <span *ngIf="message$ | async as message">{{ message }}</span>
  `
})
class TestComponent {
  @Input('price') @AsObservable() price$!: Observable<number>;
  @Input('name') @AsObservable() name$!: Observable<string>;

  message$ = combineLatest(this.price$, this.name$).pipe(
    map(([price, name]) => `${name} costs ${price}`)
  )
}

The @AsObservable decorator works together with @Input to provide an input property behaving as an Observable.

Using @AsObservable compiles when using the AOT compiler and has been inspired by ngx-observable-input.

Observe

ngx-propserve includes also the @Observe decorator that allows to subscribe to the stream of changes of another property. It can be used for @Input properties, but not necessarily. For instance:

@Component({
  selector: 'app-test',
  template: `
    <span *ngIf="message$ | async as message">{{ message }}</span>
  `
})
class TestComponent {
  @Input('price') price: number;
  @Observe('price') price$!: Observable<number>;

  message$ = this.price$.pipe(
    map((price]) => `This costs ${price}`)
  )
}

The @Observe decorator separates explicitly the input and the observing mechanisms, and so, it has a more transparent functionality.