3
我使用複雜的FormBuilder構建表單。Angularjs 2/4使用Complex Formbuilder進行表單驗證
this.myForm = this._fb.group({
name: ['', [Validators.required, Validators.minLength(5)]],
addresses: this._fb.group({
street: ['pp', Validators.required],
state: {
city: ['New York']
},
postcode: ['']
})
});
在嵌套的形式中,我有一個可以更新城市的字段。我怎樣才能使用formControlName。