Normally, you write Angular applications by composing HTML templates with the Angular-specific markup and component classes to manage those templates. A component is simply a TypeScript class annotated with @Component. The @Component decorator is used to define the associated metadata. It expects an object with the following most used properties:
- selector: This is the name of the HTML tag representing this component
- template: This is an inline-defined template with HTML/Angular markup for the view
- templateUrl: This is the path to an external file where the template resides
- styles: An inline-defined styles to be applied to this component's view
- styleUrls: An array of paths to external files with ...