diff --git a/aio/content/guide/cheatsheet.md b/aio/content/guide/cheatsheet.md index 577872ab9c..f3e55928d3 100644 --- a/aio/content/guide/cheatsheet.md +++ b/aio/content/guide/cheatsheet.md @@ -185,8 +185,7 @@ is available to declarations of this module.

@Injectable()
class MyService() {}
-

Declares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class. -

+

Declares that a class can be provided and injected by other classes. Without this decorator, the compiler won't generate enough metadata to allow the class to be created properly when it's injected somewhere.

diff --git a/packages/core/src/di/injectable.ts b/packages/core/src/di/injectable.ts index f79906235b..107e2b5bbf 100644 --- a/packages/core/src/di/injectable.ts +++ b/packages/core/src/di/injectable.ts @@ -31,15 +31,20 @@ export type InjectableProvider = ValueSansProvider | ExistingSansProvider | */ export interface InjectableDecorator { /** - * Decorator that marks a class as available to `Injector` for creation. + * Decorator that marks a class as available to be + * provided and injected as a dependency. * * @see [Introduction to Services and DI](guide/architecture-services) * @see [Dependency Injection Guide](guide/dependency-injection) * * @usageNotes * - * The following example shows how service classes are properly marked as - * injectable. + * Marking a class with `@Injectable` ensures that the compiler + * will generate the necessary metadata to create the class's + * dependencies when the class is injected. + * + * The following example shows how a service class is properly + * marked so that a supporting service can be injected upon creation. * *