No provider for ControlContainer - Angular 5

后端 未结 8 1200
萌比男神i
萌比男神i 2020-12-09 14:26

I am converting a purchased, third-party template into an Angular 5 app, and just ran into an error. I am very new to Angular 5 (I know AngularJS well however) and don\'t un

8条回答
  •  猫巷女王i
    2020-12-09 15:19

    I had this issue in Angular(Jasmin) Test cases.

    I have accidentally added angular form modules in the import of my Unit Test at beforeEach, one is FormModule (by angular) and other one is Custom FormModule.

    I need only Custom FormModule, once I removed the FormModule (by angular) the issue resolved

    beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [CustomTranslateModule.forRoot(),
        CustomRightPanelModule,
        CustomListModule,
        CustomInputTextModule,
        CustomMasterPageModule,
        CustomFormModule,
        FormModule, // this is unnecessary 
        .....................
        .....................
    

提交回复
热议问题