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

203 lines
2.5 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/debug/debug_element.ts#L9-L138">angular2/src/debug/debug_element.ts (line 9)</a>
:markdown
A DebugElement contains information from the Angular compiler about an
element and provides access to the corresponding ElementInjector and
underlying dom Element, as well as a way to query for children.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_parentView: AppView, _boundElementIndex: number)
:markdown
.l-sub-section
h3 componentInstance
:markdown
.l-sub-section
h3 nativeElement
:markdown
.l-sub-section
h3 elementRef
:markdown
.l-sub-section
h3 getDirectiveInstance
pre.prettyprint
code.
getDirectiveInstance(directiveIndex: number)
:markdown
.l-sub-section
h3 children
:markdown
Get child DebugElements from within the Light DOM.
.l-sub-section
h3 componentViewChildren
:markdown
Get the root DebugElement children of a component. Returns an empty
list if the current DebugElement is not a component root.
.l-sub-section
h3 triggerEventHandler
pre.prettyprint
code.
triggerEventHandler(eventName: string, eventObj: Event)
:markdown
.l-sub-section
h3 hasDirective
pre.prettyprint
code.
hasDirective(type: Type)
:markdown
.l-sub-section
h3 inject
pre.prettyprint
code.
inject(type: Type)
:markdown
.l-sub-section
h3 getLocal
pre.prettyprint
code.
getLocal(name: string)
:markdown
.l-sub-section
h3 query
pre.prettyprint
code.
query(predicate: Predicate&lt;DebugElement&gt;, scope?: Function)
:markdown
Return the first descendant TestElement matching the given predicate
and scope.
.l-sub-section
h3 queryAll
pre.prettyprint
code.
queryAll(predicate: Predicate&lt;DebugElement&gt;, scope?: Function)
:markdown
Return descendant TestElememts matching the given predicate
and scope.