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

Function createLQuery

packages/core/src/render3/queries/query.ts:473–482  ·  view source on GitHub ↗

* Creates a new instance of LQuery and returns its index in the collection of LQuery objects. * * @returns index in the collection of LQuery objects

(tView: TView, lView: LView, flags: QueryFlags)

Source from the content-addressed store, hash-verified

471 * @returns index in the collection of LQuery objects
472 */
473function createLQuery<T>(tView: TView, lView: LView, flags: QueryFlags): number {
474 const queryList = new QueryList<T>(
475 (flags & QueryFlags.emitDistinctChangesOnly) === QueryFlags.emitDistinctChangesOnly,
476 );
477
478 storeCleanupWithContext(tView, lView, queryList, queryList.destroy);
479
480 const lQueries = (lView[QUERIES] ??= new LQueries_()).queries;
481 return lQueries.push(new LQuery_(queryList)) - 1;
482}
483
484export function createViewQuery<T>(
485 predicate: ProviderToken<unknown> | string[] | string,

Callers 2

createViewQueryFunction · 0.85
createContentQueryFunction · 0.85

Calls 2

storeCleanupWithContextFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…