MCPcopy Create free account
hub / github.com/angular/angular / constructor

Method constructor

packages/examples/core/di/ts/metadata_spec.ts:150–155  ·  view source on GitHub ↗
(@Optional() @Host() os: OtherService, @Optional() @Host() hs: HostService)

Source from the content-addressed store, hash-verified

148 logs: string[] = [];
149
150 constructor(@Optional() @Host() os: OtherService, @Optional() @Host() hs: HostService) {
151 // os is null: true
152 this.logs.push(`os is null: ${os === null}`);
153 // hs is an instance of HostService: true
154 this.logs.push(`hs is an instance of HostService: ${hs instanceof HostService}`);
155 }
156 }
157
158 @Component({

Callers

nothing calls this directly

Calls 3

OptionalInterface · 0.90
HostInterface · 0.90
pushMethod · 0.45

Tested by

no test coverage detected