Problem Statement
Explain the purpose of the @Component decorator in Angular.
Explanation
The @Component decorator tells Angular that the class is a component. It provides metadata such as the selector (custom HTML tag), template (HTML structure), and styles. It connects the component’s logic to its view, enabling Angular to render and manage the component efficiently.