响应式表单
FormControl 的 valueChanges 属性和 statusChanges 属性包含了会发出变更事件的可观察对象。...例子
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators, FormControl..., AbstractControl } from '@angular/forms';
import { concat, merge, zip, combineLatest, race } from 'rxjs.../index';
import { filter, map, startWith, } from 'rxjs/internal/operators';
@Component({
selector...(res => console.log(res));
如果需要额外的逻辑,只需要在pipe添加相应的运算符。