DebugElement

      
      
  1. interface DebugElement extends DebugNode {
  2. name: string
  3. properties: {...}
  4. attributes: {...}
  5. classes: {...}
  6. styles: {...}
  7. childNodes: DebugNode[]
  8. nativeElement: any
  9. children: DebugElement[]
  10. query(predicate: Predicate<DebugElement>): DebugElement
  11. queryAll(predicate: Predicate<DebugElement>): DebugElement[]
  12. queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
  13. triggerEventHandler(eventName: string, eventObj: any): void
  14.  
  15. // 继承自 core/DebugNode
  16. listeners: EventListener[]
  17. parent: DebugElement | null
  18. nativeNode: any
  19. injector: Injector
  20. componentInstance: any
  21. context: any
  22. references: {...}
  23. providerTokens: any[]
  24. }

属性

属性说明
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[] 只读

方法

queryAll(predicate: Predicate<DebugElement>): DebugElement[]
      
      queryAll(predicate: Predicate<DebugElement>): DebugElement[]
    
参数
predicate Predicate
返回值

DebugElement[]

queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
      
      queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[]
    
参数
predicate Predicate
返回值

DebugNode[]

triggerEventHandler(eventName: string, eventObj: any): void
      
      triggerEventHandler(eventName: string, eventObj: any): void
    
参数
eventName string
eventObj any
返回值

void