2017-07-20 10 views

答えて

3

あなたは1個の単純なエラーを持って、あなたのaddChild()から最後controlsを削除:

addChild(i: number) { 
    const control = 
     //remove the last 'controls' 
     this.searchform.controls.rooms).controls[i]).controls["children"].controls; 
    control.push(this.initAge()); 
} 

、代わりに:https://plnkr.co/edit/SmnjBroGHufori1PWNSR?p=preview

addChild(i: number) { 
    const control = 
     this.searchform.controls.rooms).controls[i]).controls["children"]; 
    control.push(this.initAge()); 
} 

ここにあなたのフォークplunkerです

関連する問題