(element: Element)
| 82 | * @publicApi |
| 83 | */ |
| 84 | export function getContext<T extends {}>(element: Element): T | null { |
| 85 | assertDomElement(element); |
| 86 | const context = getLContext(element)!; |
| 87 | const lView = context ? context.lView : null; |
| 88 | return lView === null ? null : (lView[CONTEXT] as T); |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * Retrieves the component instance whose view contains the DOM element. |
no test coverage detected
searching dependent graphs…