MCPcopy Index your code
hub / github.com/angular/angular / componentInstance

Method componentInstance

packages/core/src/debug/debug_node.ts:85–90  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

83 * The element's own component instance, if it has one.
84 */
85 get componentInstance(): any {
86 const nativeElement = this.nativeNode;
87 return (
88 nativeElement && (getComponent(nativeElement as Element) || getOwningComponent(nativeElement))
89 );
90 }
91
92 /**
93 * An object that provides parent context for this element. Often an ancestor component instance

Callers

nothing calls this directly

Calls 2

getComponentFunction · 0.90
getOwningComponentFunction · 0.90

Tested by

no test coverage detected