MCPcopy
hub / github.com/angular/angular / constructor

Method constructor

packages/core/test/linker/integration_spec.ts:2243–2251  ·  view source on GitHub ↗
(private vc: ViewContainerRef)

Source from the content-addressed store, hash-verified

2241class DynamicViewport {
2242 private injector: Injector;
2243 constructor(private vc: ViewContainerRef) {
2244 const myService = new MyService();
2245 myService.greeting = 'dynamic greet';
2246
2247 this.injector = Injector.create({
2248 providers: [{provide: MyService, useValue: myService}],
2249 parent: vc.injector,
2250 });
2251 }
2252
2253 create(): ComponentRef<ChildCompUsingService> {
2254 return this.vc.createComponent(ChildCompUsingService, {

Callers

nothing calls this directly

Calls 1

createMethod · 0.65

Tested by

no test coverage detected