Components are the building blocks of Angular applications, and any such application needs at least one component called the root component to be defined before it can be executed.
Components 101
A basic root component
A component is defined in Angular as a class with specific metadata that associates it with an HTML template and a jQuery-like HTML DOM selector:
- The component template can be bound to any properties or functions that belong to the component class
- The component selector (similar to a jQuery selector) can target an element tag, attribute, or style class that defines the component insertion point
When executed within an Angular application, a component will usually render an HTML snippet in a specific page location...