Hello all, I am currently learning Angular and facing an issue related to components. I have successfully created a component named "test".
When I execute the code, I get the desired output. However, if I remove the
Below is the code for test.component.ts:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.css']
})
export class TestComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
Here is the content of test.component.html:
test is working
And here is the content of app.component.html:
<app-test></app-test>
I would appreciate any guidance on where I might be going wrong. Do I need to include the selector tag of every component in the app.component.html file (root HTML code)?