(nodeIndex: number, lView: LView)
| 317 | * @param lView The target view data |
| 318 | */ |
| 319 | export function getDirectivesAtNodeIndex(nodeIndex: number, lView: LView): any[] | null { |
| 320 | const tNode = lView[TVIEW].data[nodeIndex] as TNode; |
| 321 | if (tNode.directiveStart === 0) return EMPTY_ARRAY; |
| 322 | const results: any[] = []; |
| 323 | for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) { |
| 324 | const directiveInstance = lView[i]; |
| 325 | if (!isComponentInstance(directiveInstance)) { |
| 326 | results.push(directiveInstance); |
| 327 | } |
| 328 | } |
| 329 | return results; |
| 330 | } |
| 331 | |
| 332 | export function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {} | null { |
| 333 | const tNode = lView[TVIEW].data[nodeIndex] as TNode; |
no test coverage detected
searching dependent graphs…