angular-docs-cn/public/docs/js/latest/api/test/TestComponentBuilder-class.jade
2015-07-28 13:41:07 -07:00

101 lines
1.8 KiB
Plaintext

p.location-badge.
exported from <a href='../test'>angular2/test</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.32/modules/angular2/src/test_lib/test_component_builder.ts#L43-L148">angular2/src/test_lib/test_component_builder.ts (line 43)</a>
:markdown
Builds a RootTestComponent for use in component level tests.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector)
:markdown
.l-sub-section
h3 overrideTemplate
pre.prettyprint
code.
overrideTemplate(componentType: Type, template: string)
:markdown
Overrides only the html of a <a href='../annotations/Component-var.html'><code>Component</code></a>.
All the other properties of the component's <a href='../annotations/View-var.html'><code>View</code></a> are preserved.
.l-sub-section
h3 overrideView
pre.prettyprint
code.
overrideView(componentType: Type, view: View)
:markdown
Overrides a component's <a href='../annotations/View-var.html'><code>View</code></a>.
.l-sub-section
h3 overrideDirective
pre.prettyprint
code.
overrideDirective(componentType: Type, from: Type, to: Type)
:markdown
Overrides the directives from the component <a href='../annotations/View-var.html'><code>View</code></a>.
.l-sub-section
h3 createAsync
pre.prettyprint
code.
createAsync(rootComponentType: Type)
:markdown
Builds and returns a RootTestComponent.