Angular · Decorator
Injectable
@Injectable marks a class so Angular can generate the metadata needed to create it and its injected dependencies. Its optional configuration can choose where the class is provided.
Last updated
Syntax
@Injectable(options?: ({ providedIn: Type<any> | 'any' } & InjectableProvider) | ({ providedIn: 'root' | 'platform' | null } & InjectableProvider));In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
InjectorInjectableProviderInjectableTypeinjectInjectionToken