Self
Self decorator
What it does
Specifies that an Injector
should retrieve a dependency only from itself.
How to use
@Injectable() class Car { constructor(@Self() public engine:Engine) {} }
Description
For more details, see the Dependency Injection Guide.
Example
class Dependency {} @Injectable() class NeedsDependency { constructor(@Self() public dependency: Depe