(nodeIndex: number, lView: LView)
| 301 | * @param lView The target view data |
| 302 | */ |
| 303 | export function getDirectivesAtNodeIndex(nodeIndex: number, lView: LView): any[] | null { |
| 304 | const tNode = lView[TVIEW].data[nodeIndex] as TNode; |
| 305 | if (tNode.directiveStart === 0) return EMPTY_ARRAY; |
| 306 | const results: any[] = []; |
| 307 | for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) { |
| 308 | const directiveInstance = lView[i]; |
| 309 | if (!isComponentInstance(directiveInstance)) { |
| 310 | results.push(directiveInstance); |
| 311 | } |
| 312 | } |
| 313 | return results; |
| 314 | } |
| 315 | |
| 316 | export function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {} | null { |
| 317 | const tNode = lView[TVIEW].data[nodeIndex] as TNode; |
no test coverage detected