ViewContainerRef

Stable

Class

Class Overview

class ViewContainerRef {
element : ElementRef
injector : Injector
parentInjector : Injector
clear() : void
get(index: number) : ViewRef
length : number
createEmbeddedView(templateRef: TemplateRef<C>, context?: C, index?: number) : EmbeddedViewRef<C>
createComponent(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>) : ComponentRef<C>
insert(viewRef: ViewRef, index?: number) : ViewRef
move(viewRef: ViewRef, currentIndex: number) : ViewRef
indexOf(viewRef: ViewRef) : number
remove(index?: number) : void
detach(index?: number) : ViewRef

}

Class Description

Class Details

exported from core/index, defined in core/src/linker/view_container_ref.ts