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

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

Here is my component in Angular 4:

@Component( {
    selector: \'input-extra-field\',
    template: `
            
20条回答
  •  萌比男神i
    2020-12-07 16:02

    I fixed this error by adding the name="fieldName" ngDefaultControl attributes to the element that carries the [(ngModel)] attribute.

提交回复
热议问题