Anatomy of a component
Every component must have:
- A TypeScript class with behaviors such as handling user input and fetching data from a server
- An HTML template that controls what renders into the DOM
- A CSS selector that defines how the component is used in HTML
You provide Angular-specific information for a component by adding a @Component decorator on top of the TypeScript class: