Component Directives

Component Directives:

It's mostly used to define HTML templates. In an Angular project, it is the most often used directive. The @component decorator is used to adorn it, a class directive. The template/HTML for the Dom Layout is specified using the component directive, and @component is a built-in feature.

app.component.css: this file includes all of the component's CSS styling. app.component.html: this file contains all of the HTML code that the component uses to show itself.

app.component.ts: this file contains all of the component's code to manage its behavior.
The app.module.ts file used to define an Angular module may also be found here.

Component Directives: In the main class, component directives are utilized. They describe how the component should be processed, created, and utilized in the runtime environment.

Both sorts of directives are available in Angular, and you can construct your own with the @Directive() decorator. The information for a directive, like that for components, links the decorated class to a selector element that you may use to put it into HTML.