Which decorator marks a TypeScript class as an Angular component?
- a
@Component✓ - b
@Directive - c
@Injectable - d
@NgModule
Explanation:
@Component supplies Angular with the metadata needed to treat the class as a component, including its view (template or templateUrl) and, for normal template usage, a selector. @Directive defines a directive without a component view, @Injectable participates in DI compilation, and @NgModule defines a module.