When trying to write tests for my Angular 2 application, I keep encountering errors related to the selectors being used:
"): AppComponent@12:35 'tab-view' is not a known element:
1. If 'my-tab' is an Angular component, ensure that it is part of this module.
2. If 'my-tab' is a Web Component, include "CUSTOM_ELEMENTS_SCHEMA" in 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>
Even after adding CUSTOM_ELEMENTS_SCHEMA
to my root module and all other modules, the errors persist.
- What additional steps should I take to resolve this issue?
- Is it necessary to include this in all modules or just the root module?
- Are there any other specific changes or additions required?