如何获得以下函数的底线来设置类别表单字段的值?
ngOnInit() {
this.findForm = this.formBuilder.group({
categories: ['', [<any>Validators.required]],
distanceNumber: ['', [<any>Validators.required]],
distanceUnit: ['kilometers', [<any>Validators.required]],
keywords: ['lemon', [<any>Validators.required]],
});
this.findForm.controls['categories'].updateValueAndValidity("shoe");
}
答案 0 :(得分:8)
main