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

Function createViewQuery

packages/core/src/render3/queries/query.ts:484–499  ·  view source on GitHub ↗
(
  predicate: ProviderToken<unknown> | string[] | string,
  flags: QueryFlags,
  read?: any,
)

Source from the content-addressed store, hash-verified

482}
483
484export function createViewQuery<T>(
485 predicate: ProviderToken<unknown> | string[] | string,
486 flags: QueryFlags,
487 read?: any,
488): number {
489 ngDevMode && assertNumber(flags, 'Expecting flags');
490 const tView = getTView();
491 if (tView.firstCreatePass) {
492 createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);
493 if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {
494 tView.staticViewQueries = true;
495 }
496 }
497
498 return createLQuery<T>(tView, getLView(), flags);
499}
500
501export function createContentQuery<T>(
502 directiveIndex: number,

Callers 2

ɵɵviewQuerySignalFunction · 0.90
ɵɵviewQueryFunction · 0.90

Calls 5

assertNumberFunction · 0.90
getTViewFunction · 0.90
getLViewFunction · 0.90
createTQueryFunction · 0.85
createLQueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…