Hey there! I’m having this error when i try to call a simple component with a It works text from a “page”.
This is my component .ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss'],
})
export class HeaderComponent implements OnInit {
constructor() { }
ngOnInit() {}
}
the “page” from where i want to call the component
<ion-content>
<app-header></app-header>
</ion-content>
That tag < app-header > is giving me this error: ‘app-header’ is not a known element:
- If ‘app-header’ is an Angular component, then verify that it is part of this module.
- If ‘app-header’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.Angular