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

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

Here is my component in Angular 4:

@Component( {
    selector: \'input-extra-field\',
    template: `
            
20条回答
  •  鱼传尺愫
    2020-12-07 16:12

    I was getting this error message in my Unit tests with Jasmine. I added ngDefaultControl attribute to the custom element(in my case it was an angular material slide toggle) and this resolves the error.

    
      Extra Cheese
    
    

    Change the above element to include ngDefaultControl atttribute

    
     Extra Cheese
    
    

提交回复
热议问题