Angular2 testing: What’s the difference between a DebugElement and a NativeElement object in a ComponentFixture?

  • nativeElement returns a reference to the DOM element
  • DebugElement is an Angular2 class that contains all kinds of references and methods relevant to investigate an element or component (See the source of DebugNode and DebugElement

Leave a Comment