This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

DebugElement

class DebugElement extends DebugNode { constructor(nativeNode: any, parent: any, _debugContext: DebugContext) name: string properties: {...} attributes: {...} classes: {...} styles: {...} childNodes: DebugNode[] nativeElement: any children: DebugElement[] addChild(child: DebugNode) removeChild(child: DebugNode) insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) insertBefore(refChild: DebugNode, newChild: DebugNode): void query(predicate: Predicate<DebugElement>): DebugElement queryAll(predicate: Predicate<DebugElement>): DebugElement[] queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] triggerEventHandler(eventName: string, eventObj: any) // inherited from core/DebugNode constructor(nativeNode: any, parent: DebugNode | null, _debugContext: DebugContext) nativeNode: any listeners: EventListener[] parent: DebugElement | null injector: Injector componentInstance: any context: any references: {...} providerTokens: any[] }
      
      class DebugElement extends DebugNode {
  constructor(nativeNode: any, parent: any, _debugContext: DebugContext)
  name: string
  properties: {...}
  attributes: {...}
  classes: {...}
  styles: {...}
  childNodes: DebugNode[]
  nativeElement: any
  children: DebugElement[]
  addChild(child: DebugNode)
  removeChild(child: DebugNode)
  insertChildrenAfter(child: DebugNode, newChildren: DebugNode[])
  insertBefore(refChild: DebugNode, newChild: DebugNode): void
  query(predicate: Predicate<DebugElement>): DebugElement
  queryAll(predicate: Predicate<DebugElement>): DebugElement[]
  queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
  triggerEventHandler(eventName: string, eventObj: any)

  // inherited from core/DebugNode
  constructor(nativeNode: any, parent: DebugNode | null, _debugContext: DebugContext)
  nativeNode: any
  listeners: EventListener[]
  parent: DebugElement | null
  injector: Injector
  componentInstance: any
  context: any
  references: {...}
  providerTokens: any[]
}
    

Constructor

constructor(nativeNode: any, parent: any, _debugContext: DebugContext)
      
      constructor(nativeNode: any, parent: any, _debugContext: DebugContext)
    

Parameters

nativeNode

Type: any.

parent

Type: any.

_debugContext

Type: DebugContext.

Properties

Property Description
name: string
properties: { [key: string]: any; }
attributes: { [key: string]: string | null; }
classes: { [key: string]: boolean; }
styles: { [key: string]: string | null; }
childNodes: DebugNode[]
nativeElement: any
children: DebugElement[] Read-only.

Methods

addChild(child: DebugNode)
      
      addChild(child: DebugNode)
    

Parameters

child

Type: DebugNode.

removeChild(child: DebugNode)
      
      removeChild(child: DebugNode)
    

Parameters

child

Type: DebugNode.

insertChildrenAfter(child: DebugNode, newChildren: DebugNode[])
      
      insertChildrenAfter(child: DebugNode, newChildren: DebugNode[])
    

Parameters

child

Type: DebugNode.

newChildren

Type: DebugNode[].

insertBefore(refChild: DebugNode, newChild: DebugNode): void
      
      insertBefore(refChild: DebugNode, newChild: DebugNode): void
    

Parameters

refChild

Type: DebugNode.

newChild

Type: DebugNode.

Returns

void

      
      query(predicate: Predicate<DebugElement>): DebugElement
    

Parameters

predicate

Type: Predicate.

Returns

DebugElement

queryAll(predicate: Predicate<DebugElement>): DebugElement[]
      
      queryAll(predicate: Predicate<DebugElement>): DebugElement[]
    

Parameters

predicate

Type: Predicate.

Returns

DebugElement[]

queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
      
      queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
    

Parameters

predicate

Type: Predicate.

Returns

DebugNode[]

triggerEventHandler(eventName: string, eventObj: any)
      
      triggerEventHandler(eventName: string, eventObj: any)
    

Parameters

eventName

Type: string.

eventObj

Type: any.