Components are the basic building blocks to build an application. A TypeScript class with * @Component() decorator,* an HTML template * styles are combined to make a component.
Component decorator
specifies
– A CSS selector that defines how the component is used in a template.
– An HTML template that instructs Angular how to render the component.
– An optional set of CSS styles that define the appearance of the template's HTML elements.
Angular Templates
Every component has an HTML template that declares how that component renders. We can define the template either inline or by path of file.
Dependency injection
Dependency injection allows you to declare the dependencies of your TypeScript classes without taking care of their instantiation. Instead, Angular handles the instantiation for you.
Directive - Angular
it's a Decorator which marks a class as an Angular directive to add custom behavior to elements in the DOM.