Angular 2 RC6: 'pattern-list' is not a known element

后端 未结 3 1466
长发绾君心
长发绾君心 2021-01-05 17:56

Simply running the application I get no error and it works just fine, but when I run my tests I get the following error:

\'pattern-list\' is not a known elem         


        
3条回答
  •  -上瘾入骨i
    2021-01-05 18:27

    As micronyks mentined in his answer I need to add my other dependencies in the declarations of configureTestingModule. So if I modify my module configuration in the test like this:

    TestBed.configureTestingModule({declarations: [AppComponent,PatternListComponent]});
    

    it'll work. It seems you need to add every dependency in the configureTestingModule declaration.

提交回复
热议问题