docs: ngComponentOutlet doc updated with new Injector creation (#27291)
PR Close #27291
This commit is contained in:
parent
d6aca79410
commit
657cf733a2
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {Compiler, Component, Injectable, Injector, NgModule, NgModuleFactory, ReflectiveInjector} from '@angular/core';
|
||||
import {Compiler, Component, Injectable, Injector, NgModule, NgModuleFactory} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
|
||||
|
||||
|
@ -56,7 +56,8 @@ class NgTemplateOutletCompleteExample {
|
|||
myContent = [[document.createTextNode('Ahoj')], [document.createTextNode('Svet')]];
|
||||
|
||||
constructor(injector: Injector) {
|
||||
this.myInjector = ReflectiveInjector.resolveAndCreate([Greeter], injector);
|
||||
this.myInjector =
|
||||
Injector.create({providers: [{provide: Greeter, deps: []}], parent: injector});
|
||||
}
|
||||
}
|
||||
// #enddocregion
|
||||
|
|
Loading…
Reference in New Issue