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

91 lines
2.0 KiB
Plaintext
Raw Normal View History

2015-04-19 16:53:18 -04:00
2015-04-22 11:06:51 -04:00
p.location-badge.
2015-04-23 11:27:36 -04:00
exported from <a href="/angular2/test.html">angular2/test</a>
2015-04-28 09:22:25 -04:00
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/test_lib/test_bed.js#L19">angular2/src/test_lib/test_bed.js (line 19)</a>
2015-04-19 16:53:18 -04:00
:markdown
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
constructor(injector: Injector)
2015-04-19 16:53:18 -04:00
:markdown
.l-sub-section
h3 createView
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
createView(component: Type, {context = null, html = null}: {context:any, html: string} = {}, [object Object], [object Object], [object Object])
2015-04-19 16:53:18 -04:00
:markdown
2015-04-20 16:57:43 -04:00
Creates an `AppView` for the given component.
2015-04-19 16:53:18 -04:00
Only either a component or a context needs to be specified but both can be provided for
advanced use cases (ie subclassing the context).
.l-sub-section
h3 overrideDirective
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
overrideDirective(component: Type, from: Type, to: Type, [object Object], [object Object], [object Object])
2015-04-19 16:53:18 -04:00
:markdown
2015-04-26 11:01:04 -04:00
Overrides the directives from the component <a href='../annotations/View-class.html'><code>View</code></a>.
2015-04-19 16:53:18 -04:00
.l-sub-section
h3 overrideView
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
overrideView(component: Type, template: View, [object Object], [object Object])
2015-04-19 16:53:18 -04:00
:markdown
2015-04-26 11:01:04 -04:00
Overrides the <a href='../annotations/View-class.html'><code>View</code></a> of a <a href='../annotations/Component-class.html'><code>Component</code></a>.
2015-04-19 16:53:18 -04:00
.l-sub-section
h3 setInlineTemplate
pre.prettyprint
code.
2015-04-20 16:57:43 -04:00
setInlineTemplate(component: Type, html: string, [object Object], [object Object])
2015-04-19 16:53:18 -04:00
:markdown
2015-04-26 11:01:04 -04:00
Overrides only the html of a <a href='../annotations/Component-class.html'><code>Component</code></a>.
All the other propoerties of the component's <a href='../annotations/View-class.html'><code>View</code></a> are preserved.
2015-04-19 16:53:18 -04:00