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

Method constructor

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

Source from the content-addressed store, hash-verified

2276class DynamicViewport {
2277 private injector: Injector;
2278 constructor(private vc: ViewContainerRef) {
2279 const myService = new MyService();
2280 myService.greeting = 'dynamic greet';
2281
2282 this.injector = Injector.create({
2283 providers: [{provide: MyService, useValue: myService}],
2284 parent: vc.injector,
2285 });
2286 }
2287
2288 create(): ComponentRef<ChildCompUsingService> {
2289 return this.vc.createComponent(ChildCompUsingService, {

Callers

nothing calls this directly

Calls 1

createMethod · 0.65

Tested by

no test coverage detected