MCPcopy Index your code
hub / github.com/angular/components / _getLevel

Method _getLevel

src/cdk/tree/tree.ts:839–841  ·  view source on GitHub ↗

* For the given node, determine the level where this node appears in the tree. * * This is intended to be used for `aria-level` but is 0-indexed.

(node: T)

Source from the content-addressed store, hash-verified

837 * This is intended to be used for `aria-level` but is 0-indexed.
838 */
839 _getLevel(node: T) {
840 return this._levels.get(this._getExpansionKey(node));
841 }
842
843 /**
844 * For the given node, determine the size of the parent's child set.

Callers 2

_paddingIndentMethod · 0.80
levelMethod · 0.80

Calls 2

_getExpansionKeyMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected