angular-docs-cn/public/docs/js/latest/api/view/DynamicComponentLoader-clas...

73 lines
1.8 KiB
Plaintext
Raw Normal View History

2015-04-19 16:53:18 -04:00
p.
<span class="location-badge">exported from <a href="/angular2/view">angular2/view</a></span>
2015-04-22 02:34:30 -04:00
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/compiler/dynamic_component_loader.js#L47">angular2/src/core/compiler/dynamic_component_loader.js (line 47)</a>
2015-04-19 16:53:18 -04:00
:markdown
Service for dynamically loading a Component into an arbitrary position in the internal Angular
application tree.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
constructor(compiler:Compiler, directiveMetadataReader:DirectiveMetadataReader, viewFactory:ViewFactory, viewHydrator:AppViewHydrator)
2015-04-19 16:53:18 -04:00
:markdown
.l-sub-section
h3 loadIntoExistingLocation
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
loadIntoExistingLocation(type:Type, location:ElementRef, injector:Injector = null)
2015-04-19 16:53:18 -04:00
:markdown
Loads a component into the location given by the provided ElementRef. The loaded component
receives injection as if it in the place of the provided ElementRef.
.l-sub-section
h3 loadIntoNewLocation
pre.prettyprint
code.
2015-04-22 02:34:30 -04:00
loadIntoNewLocation(type:Type, parentComponentLocation:ElementRef, elementOrSelector:any, injector:Injector = null)
2015-04-19 16:53:18 -04:00
2015-04-22 02:34:30 -04:00
:markdown
Loads a component in the element specified by elementOrSelector. The loaded component receives
injection normally as a hosted view.
2015-04-19 16:53:18 -04:00
2015-04-22 02:34:30 -04:00
.l-sub-section
h3 loadNextToExistingLocation
pre.prettyprint
code.
loadNextToExistingLocation(type:Type, location:ElementRef, injector:Injector = null)
2015-04-19 16:53:18 -04:00
:markdown
2015-04-22 02:34:30 -04:00
Loads a component next to the provided ElementRef. The loaded component receives
injection normally as a hosted view.
2015-04-19 16:53:18 -04:00