取得DOM节点:
ComponentFactoryResolver.resolveComponentFactory.create.location.nativeElement
class ComponentFactoryResolver {
static NULL: ComponentFactoryResolver
resolveComponentFactory<T>(component: Type<T>):ComponentFactory<T>
}
class ComponentFactory<C> {
get selector(): string
get componentType(): Type<any>
get ngContentSelectors(): string[]
get inputs(): {propName: string, templateName: string}[]
get outputs(): {propName: string, templateName: string}[]
create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any, ngModule?: NgModuleRef<any>): ComponentRef<C>
}
class ComponentRef<C> {
get location(): ElementRef
get injector(): Injector
get instance(): C
get hostView(): ViewRef
get changeDetectorRef(): ChangeDetectorRef
get componentType(): Type<any>
destroy(): void
onDestroy(callback: Function): void
}
class ElementRef {
nativeElement: any
}