MCPcopy
hub / github.com/angular/angular / ServiceWithDep

Class ServiceWithDep

packages/core/test/di/r3_injector_spec.ts:69–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 const UNDEFINED_VALUE = new InjectionToken<undefined>('UNDEFINED_VALUE');
68
69 class ServiceWithDep {
70 constructor(readonly service: Service) {}
71
72 static ɵprov = ɵɵdefineInjectable({
73 token: ServiceWithDep,
74 providedIn: null,
75 // ChildService is derived from ServiceWithDep, so the factory function here must do the right
76 // thing and create an instance of the requested type if one is given.
77 factory: (t?: any) => new (t || ServiceWithDep)(ɵɵinject(Service)),
78 });
79 }
80
81 class ServiceWithOptionalDep {
82 constructor(@Optional() readonly service: OptionalService | null) {}

Callers

nothing calls this directly

Calls 2

ɵɵdefineInjectableFunction · 0.90
ɵɵinjectFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…