What is the primary purpose of the
@Injectable() decorator in Angular?- aMarks a class for construction by Angular's DI system✓
- bMarks a class as an Angular component
- cRegisters a class as an HTTP interceptor
- dDeclares a class as a routing guard
Explanation:
@Injectable() tells Angular's compiler and DI system that this class can be constructed and injected, optionally attaching metadata like providedIn. It is unrelated to @Component (view classes) or to being specifically a guard/interceptor — those are separate roles a class can additionally take on.