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

Function markAsComponentHost

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

* Marks a given TNode as a component's host. This consists of: * - setting the component offset on the TNode. * - storing index of component's host element so it will be queued for view refresh during CD.

(tView: TView, hostTNode: TNode, componentOffset: number)

Source from the content-addressed store, hash-verified

126 * - storing index of component's host element so it will be queued for view refresh during CD.
127 */
128function markAsComponentHost(tView: TView, hostTNode: TNode, componentOffset: number): void {
129 ngDevMode && assertFirstCreatePass(tView);
130 ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
131 hostTNode.componentOffset = componentOffset;
132 (tView.components ??= []).push(hostTNode.index);
133}
134
135/** Initializes the data structures necessary for a list of directives to be instantiated. */
136function initializeDirectives(

Callers 1

initializeDirectivesFunction · 0.85

Calls 3

assertFirstCreatePassFunction · 0.90
assertGreaterThanFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…