DebugElement
class DebugElement extends DebugNode {
constructor(nativeNode: Element)
nativeElement: any
name: string
properties: {...}
attributes: {...}
styles: {...}
classes: {...}
childNodes: DebugNode[]
children: DebugElement[]
query(predicate: Predicate<DebugElement>): DebugElement
queryAll(predicate: Predicate<DebugElement>): DebugElement[]
queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
triggerEventHandler(eventName: string, eventObj?: any): void
// inherited from core/DebugNode
constructor(nativeNode: Node)
nativeNode: any
parent: DebugElement | null
injector: Injector
componentInstance: any
context: any
listeners: DebugEventListener[]
references: {...}
providerTokens: any[]
}
See also
Constructor
Properties
Property | Description |
---|---|
nativeElement: any
|
Read-Only
The underlying DOM element at the root of the component. |
name: string
|
Read-Only
The element tag name, if it is an element. |
properties: {
[key: string]: any;
}
|
Read-Only
Gets a map of property names to property values for an element. This map includes:
|
attributes: {
[key: string]: string | null;
}
|
Read-Only
A map of attribute names to attribute values for an element. |
styles: {
[key: string]: string | null;
}
|
Read-Only
The inline styles of the DOM element. |
classes: {
[key: string]: boolean;
}
|
Read-Only
A map containing the class names on the element as keys. This map is derived from the Note: The values of this object will always be See also: |
childNodes: DebugNode[]
|
Read-Only
The See also: |
children: DebugElement[]
|
Read-Only
The immediate |
Methods
query() | |||
---|---|---|---|
Parameters
Returns
|
queryAll() | |||
---|---|---|---|
Parameters
Returns
|
queryAllNodes() |
---|
triggerEventHandler() |
---|
Triggers the event by its name if there is a corresponding listener in the element's
See also: |
If the event lacks a listener or there's some other problem, consider
calling |