I have created a component and its name is s-header. This component is registered in HomeModule because its a part of this module, but when i try to display this component in home.component.html it gives me this erorr.
If 's-header' is an Angular component, then verify that it is part of this module.
If 's-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
here is my code
import { HeaderComponent } from '../../general-components/header/header.component';
declarations: [
HeaderComponent,
],
this is a header component
import { Component, OnInit } from '@angular/core';
@Component({
selector: 's-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.css']
})
export class HeaderComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
this is how i am trying to display it
<s-header></s-header>
question from:
https://stackoverflow.com/questions/65850706/getting-error-while-displaying-a-component-in-lazy-loaded-module-in-angular 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…