DebugElement • Angular (original) (raw)

The underlying DOM element at the root of the component.

The element tag name, if it is an element.

Gets a map of property names to property values for an element.

This map includes:

It does not include:

A map of attribute names to attribute values for an element.

The inline styles of the DOM element.

A map containing the class names on the element as keys.

This map is derived from the className property of the DOM element.

Note: The values of this object will always be true. The class key will not appear in the KV object if it does not exist on the element.

The childNodes of the DOM element as a DebugNode array.

The immediate DebugElement children. Walk the tree by descending through children.

Triggers the event by its name if there is a corresponding listener in the element'slisteners collection.

If the event lacks a listener or there's some other problem, consider calling nativeElement.dispatchEvent(eventObject).

@parameventNamestring

The name of the event to trigger

@parameventObjany

The event object expected by the handler

@returnsvoid

The DebugElement parent. Will be null if this is the root element.

The host dependency injector. For example, the root element's component instance injector.

The element's own component instance, if it has one.

An object that provides parent context for this element. Often an ancestor component instance that governs this element.

When an element is repeated within *ngFor, the context is an NgForOf whose $implicitproperty is the value of the row instance value. For example, the hero in *ngFor="let hero of heroes".

The callbacks attached to the component's @Output properties and/or the element's event properties.

Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local variable name.

This component's injector lookup tokens. Includes the component itself plus the tokens that the component lists in its providers metadata.