Angular 12 - This is my angular version
I tried to import a component to another component using a selector.I got this following error.
- If 'app-features' is an Angular component, then verify that it is part of this module.
- If 'app-features' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
enter image description here
CodePudding user response:
does app-features
have it's own module where the component is declared and exported? if yes, you should import the module in the same module as home-component.
If not, you should declare the app-features
component in the same module as home-component or in AppModule
CodePudding user response:
this error happens when angular can not find which module a component actually belongs to! so first just find app-features module then add it to imports array of its module! easy!