(componentOrLView: LView | {})
| 23 | * @param componentOrLView any component or `LView` |
| 24 | */ |
| 25 | export function getRootView<T>(componentOrLView: LView | {}): LView<T> { |
| 26 | ngDevMode && assertDefined(componentOrLView, 'component'); |
| 27 | let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView)!; |
| 28 | while (lView && !isRootView(lView)) { |
| 29 | lView = getLViewParent(lView)!; |
| 30 | } |
| 31 | ngDevMode && assertLView(lView); |
| 32 | return lView as LView<T>; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Returns the context information associated with the application where the target is situated. It |
no test coverage detected
searching dependent graphs…