Host
Host decorator
What it does
Specifies that an injector should retrieve a dependency from any injector until reaching the host element of the current component.
How to use
@Injectable() class Car { constructor(@Host() public engine:Engine) {} }
Description
For more details, see the Dependency Injection Guide.
Example
class OtherService {} class HostService {} @Directive({selector: 'child-directive'}) class ChildDirective { logs: string[]