2015-09-14 15:01:08 -07:00
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.37/modules/angular2/src/test_lib/test_component_builder.ts#L48-L206">angular2/src/test_lib/test_component_builder.ts (line 48)</a>
:markdown
2015-09-16 23:40:23 -07:00
Builds a RootTestComponent for use in component level tests.
2015-09-14 15:01:08 -07:00
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
2015-09-16 23:40:23 -07:00
h3#constructor constructor
2015-09-14 15:01:08 -07:00
pre.prettyprint
code.
constructor(_injector: Injector)
:markdown
.l-sub-section
2015-09-16 23:40:23 -07:00
h3#overrideTemplate overrideTemplate
2015-09-14 15:01:08 -07:00
pre.prettyprint
code.
overrideTemplate(componentType: Type, template: string)
:markdown
Overrides only the html of a <a href='../core/ComponentMetadata-class.html'><code>ComponentMetadata</code></a>.
All the other properties of the component's <a href='../core/ViewMetadata-class.html'><code>ViewMetadata</code></a> are preserved.
.l-sub-section
2015-09-16 23:40:23 -07:00
h3#overrideView overrideView
2015-09-14 15:01:08 -07:00
pre.prettyprint
code.
overrideView(componentType: Type, view: ViewMetadata)
:markdown
Overrides a component's <a href='../core/ViewMetadata-class.html'><code>ViewMetadata</code></a>.
.l-sub-section
2015-09-16 23:40:23 -07:00
h3#overrideDirective overrideDirective
2015-09-14 15:01:08 -07:00
pre.prettyprint
code.
overrideDirective(componentType: Type, from: Type, to: Type)
:markdown
Overrides the directives from the component <a href='../core/ViewMetadata-class.html'><code>ViewMetadata</code></a>.
.l-sub-section
2015-09-16 23:40:23 -07:00
h3#overrideBindings overrideBindings
2015-09-14 15:01:08 -07:00
pre.prettyprint
code.
overrideBindings(type: Type, bindings: any[])
:markdown
Overrides one or more injectables configured via `bindings` metadata property of a directive or
component.
Very useful when certain bindings need to be mocked out.
The bindings specified via this method are appended to the existing `bindings` causing the
duplicated bindings to
be overridden.
.l-sub-section
2015-09-16 23:40:23 -07:00
h3#overrideViewBindings overrideViewBindings
2015-09-14 15:01:08 -07:00
pre.prettyprint
code.
overrideViewBindings(type: Type, bindings: any[])
:markdown
Overrides one or more injectables configured via `bindings` metadata property of a directive or
component.
Very useful when certain bindings need to be mocked out.
The bindings specified via this method are appended to the existing `bindings` causing the
duplicated bindings to
be overridden.
.l-sub-section
2015-09-16 23:40:23 -07:00
h3#createAsync createAsync
2015-09-14 15:01:08 -07:00
pre.prettyprint
code.
createAsync(rootComponentType: Type)
:markdown
Builds and returns a RootTestComponent.