Skip to Content

$ Property Readonly

Allows subscribers to reactively observe changes or updates to the data in an Angular form

API

readonly $: Observable<T>;

Example

import {FormControl, FormGroup} from '@angular/forms'; import {map} from 'rxjs'; import {formSource} from '@bitfiber/ng/rx'; interface FormValue { itemId: number; search: string; } // Creates a form group const formGroup = new FormGroup({ itemId: new FormControl(1, {nonNullable: true}), search: new FormControl('', {nonNullable: true}), }); // Creates a form source const source = formSource<FormValue>(formGroup); // Uses form source observable source.$ .pipe(map(v => v * 2)) .subscribe(v => console.log(v));
Last updated on