Skip to content

timo-haas/ngx-input-observable-decorator

Repository files navigation

ngx-input-observable-decorator

Build Status

Install

npm install ngx-input-observable-decorator

Usage

import { Input } from '@angular/core';
import { InputObservable } from 'ngx-input-observable-decorator';
import { Observable } from 'rxjs';

class AComponent {
    @Input()
    @InputObservable()
    textValue: string;
    textValue$: Observable<string>; // generated observable of textValue
}

Demo

Stackblitz