MCPcopy
hub / github.com/angular/angular / query

Method query

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

* @returns the first `DebugElement` that matches the predicate at any depth in the subtree.

(predicate: Predicate<DebugElement>)

Source from the content-addressed store, hash-verified

318 * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
319 */
320 query(predicate: Predicate<DebugElement>): DebugElement {
321 const results = this.queryAll(predicate);
322 return results[0] || null;
323 }
324
325 /**
326 * @returns All `DebugElement` matches for the predicate at any depth in the subtree.

Calls 1

queryAllMethod · 0.95

Tested by 10

beforeEachFunction · 0.36
getDebugElementsFunction · 0.36
getCdLabelFunction · 0.36
getMatchesCountElFunction · 0.36
initTestComponentFunction · 0.36