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

Function initTNodeFlags

packages/core/src/render3/view/directives.ts:554–566  ·  view source on GitHub ↗

* Initializes the flags on the current node, setting all indices to the initial index, * the directive count to 0, and adding the isComponent flag. * @param index the initial index

(tNode: TNode, index: number, numberOfDirectives: number)

Source from the content-addressed store, hash-verified

552 * @param index the initial index
553 */
554function initTNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {
555 ngDevMode &&
556 assertNotEqual(
557 numberOfDirectives,
558 tNode.directiveEnd - tNode.directiveStart,
559 'Reached the max number of directives',
560 );
561 tNode.flags |= TNodeFlags.isDirectiveHost;
562 // When the first directive is created on a node, save the index
563 tNode.directiveStart = index;
564 tNode.directiveEnd = index + numberOfDirectives;
565 tNode.providerIndexes = index;
566}
567
568function assertNoDuplicateDirectives(directives: DirectiveDef<unknown>[]): void {
569 // The array needs at least two elements in order to have duplicates.

Callers 1

initializeDirectivesFunction · 0.85

Calls 1

assertNotEqualFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…