MCPcopy Create free account
hub / github.com/angular/angular / getComponentLView

Function getComponentLView

packages/core/src/render3/util/discovery_utils.ts:498–506  ·  view source on GitHub ↗
(target: any)

Source from the content-addressed store, hash-verified

496 * @param target DOM element or component instance for which to retrieve the LView.
497 */
498export function getComponentLView(target: any): LView {
499 const lContext = getLContext(target)!;
500 const nodeIndx = lContext.nodeIndex;
501 const lView = lContext.lView!;
502 ngDevMode && assertLView(lView);
503 const componentLView = lView[nodeIndx];
504 ngDevMode && assertLView(componentLView);
505 return componentLView;
506}
507
508/** Asserts that a value is a DOM Element. */
509function assertDomElement(value: any) {

Callers 3

i18n_spec.tsFile · 0.90
hmr_spec.tsFile · 0.90

Calls 2

getLContextFunction · 0.90
assertLViewFunction · 0.90

Tested by

no test coverage detected