No value accessor for form control

前端 未结 7 1998
不思量自难忘°
不思量自难忘° 2020-12-29 18:04

I\'m using Angular2-rc5, and I\'m currently getting an error on my login page. I\'m trying to make a form but the console throws exceptions telling me that it can\'t find my

相关标签:
7条回答
  • 2020-12-29 18:46

    For UnitTest angular 2 with angular material you have to add MatSelectModule module in imports section.

    import { MatSelectModule } from '@angular/material';
    
    beforeEach(async(() => {
        TestBed.configureTestingModule({
          declarations: [ CreateUserComponent ],
          imports : [ReactiveFormsModule,        
            MatSelectModule,
            MatAutocompleteModule,......
    
          ],
          providers: [.........]
        })
        .compileComponents();
      }));
    
    0 讨论(0)
提交回复
热议问题