在为我的Angular 2应用程序编写测试时,我遇到了这些错误:我们正在使用的选择器:
"): AppComponent@12:35 'tab-view' is not a known element:
1. If 'my-tab' is an Angular component, then verify that it is part of this module.
2. If 'my-tab' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("
</div>
<div class="app-body">
[ERROR ->]<tab-view class="my-tab" [options]="tabOptions"></tab-view>
</div> </div>
Run Code Online (Sandbox Code Playgroud)
我已经添加CUSTOM_ELEMENTS_SCHEMA到我的根模块,以及所有其他模块,但我仍然得到错误.