feat(NgComponentOutlet): add NgModule support to NgComponentOutlet directive (#14088)

Allow NgComponentOutlet to dynamically load a module, then load a component from
that module. Useful for lazy loading code, then add the lazy loaded code to the
page using NgComponentOutlet.

Closes #14043
This commit is contained in:
Jason Aden
2017-01-25 17:41:08 -08:00
committed by Victor Berchet
parent 4106d18172
commit 3ef73c2b19
5 changed files with 196 additions and 33 deletions

View File

@ -118,13 +118,14 @@ export declare class NgClass implements DoCheck {
}
/** @experimental */
export declare class NgComponentOutlet implements OnChanges {
componentRef: ComponentRef<any>;
export declare class NgComponentOutlet implements OnChanges, OnDestroy {
ngComponentOutlet: Type<any>;
ngComponentOutletContent: any[][];
ngComponentOutletInjector: Injector;
constructor(_cmpFactoryResolver: ComponentFactoryResolver, _viewContainerRef: ViewContainerRef);
ngComponentOutletNgModuleFactory: NgModuleFactory<any>;
constructor(_viewContainerRef: ViewContainerRef);
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
}
/** @stable */