ERROR Error: No value accessor for form control with unspecified name attribute on switch

后端 未结 20 2429
感情败类
感情败类 2020-12-07 15:33

Here is my component in Angular 4:

@Component( {
    selector: \'input-extra-field\',
    template: `
            
20条回答
  •  Happy的楠姐
    2020-12-07 16:04

    Have you tried moving your [(ngModel)] to the div instead of the switch in your HTML? I had the same error appear in my code and it was because I bound the model to a instead of a . Though I am not using form control.

提交回复
热议问题