Angular 2模板的访问控制值

时间:2017-01-26 14:37:10

标签: angular angular2-forms

是否可以从我的模板中访问channel_header控件    这个=> _form.controls ['头&#39]。对照[I] .controls.channel_header

import { FormBuilder, Validators, FormArray } from '@angular/forms';

constructor(private _fb: FormBuilder) 
ngOnInit() {
  this._form = this._fb.group({
       headers: this._fb.array([
           this._fb.group({
               channel_header: ['', Validators.required],
               data_option: ['', Validators.required]  
           })
       ]);
  });
}

1 个答案:

答案 0 :(得分:1)

我认为应该这样工作

WebApiConfig.cs