angular-cn/public/docs/js/latest/api/test/TestBed-class.jade

97 lines
1.9 KiB
Plaintext

p.location-badge.
exported from <a href='../test'>angular2/test</a>
defined in <a href="https://github.com/angular/angular/tree/3a0410a/modules/angular2/src/test_lib/test_bed.ts#L22-L106">angular2/src/test_lib/test_bed.ts (line 22)</a>
:markdown
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector)
:markdown
.l-sub-section
h3 overrideView
pre.prettyprint
code.
overrideView(component: Type, template: View)
:markdown
Overrides the <a href='../annotations/View-var.html'><code>View</code></a> of a <a href='../annotations/Component-var.html'><code>Component</code></a>.
.l-sub-section
h3 setInlineTemplate
pre.prettyprint
code.
setInlineTemplate(component: Type, html: string)
:markdown
Overrides only the html of a <a href='../annotations/Component-var.html'><code>Component</code></a>.
All the other propoerties of the component's <a href='../annotations/View-var.html'><code>View</code></a> are preserved.
.l-sub-section
h3 overrideDirective
pre.prettyprint
code.
overrideDirective(component: 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 createView
pre.prettyprint
code.
createView(component: Type, {context = null, html = null}?: {context?: any,
html?: string})
:markdown
Creates an `AppView` for the given component.
Only either a component or a context needs to be specified but both can be provided for
advanced use cases (ie subclassing the context).