* 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)
| 126 | * - storing index of component's host element so it will be queued for view refresh during CD. |
| 127 | */ |
| 128 | function 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. */ |
| 136 | function initializeDirectives( |
no test coverage detected
searching dependent graphs…