Skip to content

Commit c25503b

Browse files
mheveryatscott
authored andcommitted
test(ivy): Have more descriptive names for LView (angular#33449)
When debugging `LView`s it is easy to get lost since all of them have the same name. This change does three things: 1. It makes `TView` have an explicit type: - `Host`: for the top level `TView` for bootstrap - `Component`: for the `TView` which represents components template - `Embedded`: for the `TView` which represents an embedded template 2. It changes the name of `LView` to `LHostView`, `LComponentView`, and `LEmbeddedView` depending on the `TView` type. 3. For `LComponentView` and `LEmbeddedView` we also append the name of of the `context` constructor. The result is that we have `LView`s which are name as: `LComponentView_MyComponent` and `LEmbeddedView_NgIfContext`. The above changes will make it easier to understand the structure of the application when debugging. NOTE: All of these are behind `ngDevMode` and will get removed in production application. PR Close angular#33449
1 parent 10583f9 commit c25503b

File tree

22 files changed

+227
-62
lines changed

22 files changed

+227
-62
lines changed

packages/core/src/render3/component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import {assertComponentType} from './assert';
1717
import {getComponentDef} from './definition';
1818
import {diPublicInInjector, getOrCreateNodeInjectorForNode} from './di';
1919
import {registerPostOrderHooks, registerPreOrderHooks} from './hooks';
20-
import {CLEAN_PROMISE, addToViewTree, createLView, createTView, getOrCreateTNode, getOrCreateTView, initNodeFlags, instantiateRootComponent, invokeHostBindingsInCreationMode, locateHostElement, markAsComponentHost, refreshView, renderView} from './instructions/shared';
20+
import {CLEAN_PROMISE, addToViewTree, createLView, createTView, getOrCreateTComponentView, getOrCreateTNode, initNodeFlags, instantiateRootComponent, invokeHostBindingsInCreationMode, locateHostElement, markAsComponentHost, refreshView, renderView} from './instructions/shared';
2121
import {ComponentDef, ComponentType, RenderFlags} from './interfaces/definition';
2222
import {TElementNode, TNode, TNodeType} from './interfaces/node';
2323
import {PlayerHandler} from './interfaces/player';
2424
import {RElement, Renderer3, RendererFactory3, domRendererFactory3} from './interfaces/renderer';
25-
import {CONTEXT, HEADER_OFFSET, LView, LViewFlags, RootContext, RootContextFlags, TVIEW} from './interfaces/view';
25+
import {CONTEXT, HEADER_OFFSET, LView, LViewFlags, RootContext, RootContextFlags, TVIEW, TViewType} from './interfaces/view';
2626
import {enterView, getPreviousOrParentTNode, incrementActiveDirectiveId, leaveView, setActiveHostElement} from './state';
2727
import {publishDefaultGlobalUtils} from './util/global_utils';
2828
import {defaultScheduler, stringifyForError} from './util/misc_utils';
@@ -124,7 +124,7 @@ export function renderComponent<T>(
124124
const rootContext = createRootContext(opts.scheduler, opts.playerHandler);
125125

126126
const renderer = rendererFactory.createRenderer(hostRNode, componentDef);
127-
const rootTView = createTView(-1, null, 1, 0, null, null, null, null, null);
127+
const rootTView = createTView(TViewType.Root, -1, null, 1, 0, null, null, null, null, null);
128128
const rootView: LView = createLView(
129129
null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, undefined,
130130
opts.injector || null);
@@ -171,8 +171,9 @@ export function createRootComponentView(
171171
rootView[0 + HEADER_OFFSET] = rNode;
172172
const tNode: TElementNode = getOrCreateTNode(tView, null, 0, TNodeType.Element, null, null);
173173
const componentView = createLView(
174-
rootView, getOrCreateTView(def), null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways,
175-
rootView[HEADER_OFFSET], tNode, rendererFactory, renderer, sanitizer);
174+
rootView, getOrCreateTComponentView(def), null,
175+
def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways, rootView[HEADER_OFFSET], tNode,
176+
rendererFactory, renderer, sanitizer);
176177

177178
if (tView.firstCreatePass) {
178179
diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);

packages/core/src/render3/component_ref.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {assignTViewNodeToLView, createLView, createTView, elementCreate, locateH
2828
import {ComponentDef} from './interfaces/definition';
2929
import {TContainerNode, TElementContainerNode, TElementNode} from './interfaces/node';
3030
import {RNode, RendererFactory3, domRendererFactory3, isProceduralRenderer} from './interfaces/renderer';
31-
import {LView, LViewFlags, TVIEW} from './interfaces/view';
31+
import {LView, LViewFlags, TVIEW, TViewType} from './interfaces/view';
3232
import {enterView, leaveView} from './state';
3333
import {defaultScheduler} from './util/misc_utils';
3434
import {getTNode} from './util/view_utils';
@@ -158,7 +158,7 @@ export class ComponentFactory<T> extends viewEngine_ComponentFactory<T> {
158158
}
159159

160160
// Create the root view. Uses empty TView and ContentTemplate.
161-
const rootTView = createTView(-1, null, 1, 0, null, null, null, null, null);
161+
const rootTView = createTView(TViewType.Root, -1, null, 1, 0, null, null, null, null, null);
162162
const rootLView = createLView(
163163
null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, sanitizer,
164164
rootViewInjector);

packages/core/src/render3/instructions/container.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/c
1313
import {ComponentTemplate} from '../interfaces/definition';
1414
import {LocalRefExtractor, TAttributes, TContainerNode, TNode, TNodeType, TViewNode} from '../interfaces/node';
1515
import {isDirectiveHost} from '../interfaces/type_checks';
16-
import {FLAGS, HEADER_OFFSET, InitPhaseState, LView, LViewFlags, RENDERER, TVIEW, T_HOST} from '../interfaces/view';
16+
import {FLAGS, HEADER_OFFSET, InitPhaseState, LView, LViewFlags, RENDERER, TVIEW, TViewType, T_HOST} from '../interfaces/view';
1717
import {assertNodeType} from '../node_assert';
1818
import {appendChild, removeView} from '../node_manipulation';
1919
import {getBindingIndex, getCheckNoChangesMode, getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state';
@@ -81,8 +81,8 @@ export function ɵɵtemplate(
8181
registerPostOrderHooks(tView, tContainerNode);
8282

8383
const embeddedTView = tContainerNode.tViews = createTView(
84-
-1, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null,
85-
tView.schemas, tViewConsts);
84+
TViewType.Embedded, -1, templateFn, decls, vars, tView.directiveRegistry,
85+
tView.pipeRegistry, null, tView.schemas, tViewConsts);
8686
const embeddedTViewNode = createTNode(tView, null, TNodeType.View, -1, null, null) as TViewNode;
8787
embeddedTViewNode.injectorIndex = tContainerNode.injectorIndex;
8888
embeddedTView.node = embeddedTViewNode;

packages/core/src/render3/instructions/embedded_view.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {assertLContainerOrUndefined} from '../assert';
1111
import {ACTIVE_INDEX, CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';
1212
import {RenderFlags} from '../interfaces/definition';
1313
import {TContainerNode, TNodeType} from '../interfaces/node';
14-
import {CONTEXT, LView, LViewFlags, PARENT, TVIEW, TView, T_HOST} from '../interfaces/view';
14+
import {CONTEXT, LView, LViewFlags, PARENT, TVIEW, TView, TViewType, T_HOST} from '../interfaces/view';
1515
import {assertNodeType} from '../node_assert';
1616
import {insertView, removeView} from '../node_manipulation';
1717
import {enterView, getIsParent, getLView, getPreviousOrParentTNode, leaveViewProcessExit, setIsParent, setPreviousOrParentTNode} from '../state';
@@ -87,8 +87,8 @@ function getOrCreateEmbeddedTView(
8787
ngDevMode && assertEqual(Array.isArray(containerTViews), true, 'TViews should be in an array');
8888
if (viewIndex >= containerTViews.length || containerTViews[viewIndex] == null) {
8989
containerTViews[viewIndex] = createTView(
90-
viewIndex, null, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, null,
91-
tView.consts);
90+
TViewType.Embedded, viewIndex, null, decls, vars, tView.directiveRegistry,
91+
tView.pipeRegistry, null, null, tView.consts);
9292
}
9393
return containerTViews[viewIndex];
9494
}

packages/core/src/render3/instructions/lview_debug.ts

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {AttributeMarker, ComponentTemplate} from '..';
10-
import {SchemaMetadata} from '../../core';
10+
import {SchemaMetadata, Type} from '../../core';
1111
import {assertDefined} from '../../util/assert';
1212
import {createNamedArrayType} from '../../util/named_array_type';
1313
import {initNgDevMode} from '../../util/ng_dev_mode';
@@ -19,7 +19,7 @@ import {SelectorFlags} from '../interfaces/projection';
1919
import {TQueries} from '../interfaces/query';
2020
import {RComment, RElement, RNode} from '../interfaces/renderer';
2121
import {TStylingContext} from '../interfaces/styling';
22-
import {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, HookData, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TData, TVIEW, TView as ITView, TView, T_HOST} from '../interfaces/view';
22+
import {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, HookData, INJECTOR, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, TData, TVIEW, TView as ITView, TView, TViewType, T_HOST} from '../interfaces/view';
2323
import {DebugNodeStyling, NodeStylingDebug} from '../styling/styling_debug';
2424
import {attachDebugObject} from '../util/debug_utils';
2525
import {isStylingContext} from '../util/styling_utils';
@@ -56,25 +56,64 @@ const NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNg
5656
* ```
5757
*/
5858

59-
export const LViewArray = NG_DEV_MODE && createNamedArrayType('LView') || null !as ArrayConstructor;
60-
let LVIEW_EMPTY: unknown[]; // can't initialize here or it will not be tree shaken, because `LView`
61-
// constructor could have side-effects.
59+
let LVIEW_COMPONENT_CACHE !: Map<string|null, Array<any>>;
60+
let LVIEW_EMBEDDED_CACHE !: Map<string|null, Array<any>>;
61+
let LVIEW_ROOT !: Array<any>;
62+
63+
interface TViewDebug extends ITView {
64+
type: TViewType;
65+
}
66+
6267
/**
6368
* This function clones a blueprint and creates LView.
6469
*
6570
* Simple slice will keep the same type, and we need it to be LView
6671
*/
67-
export function cloneToLView(list: any[]): LView {
68-
if (LVIEW_EMPTY === undefined) LVIEW_EMPTY = new LViewArray();
69-
return LVIEW_EMPTY.concat(list) as any;
72+
export function cloneToLViewFromTViewBlueprint(tView: TView): LView {
73+
const debugTView = tView as TViewDebug;
74+
const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
75+
return lView.concat(tView.blueprint) as any;
76+
}
77+
78+
function getLViewToClone(type: TViewType, name: string | null): Array<any> {
79+
switch (type) {
80+
case TViewType.Root:
81+
if (LVIEW_ROOT === undefined) LVIEW_ROOT = new (createNamedArrayType('LRootView'))();
82+
return LVIEW_ROOT;
83+
case TViewType.Component:
84+
if (LVIEW_COMPONENT_CACHE === undefined) LVIEW_COMPONENT_CACHE = new Map();
85+
let componentArray = LVIEW_COMPONENT_CACHE.get(name);
86+
if (componentArray === undefined) {
87+
componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
88+
LVIEW_COMPONENT_CACHE.set(name, componentArray);
89+
}
90+
return componentArray;
91+
case TViewType.Embedded:
92+
if (LVIEW_EMBEDDED_CACHE === undefined) LVIEW_EMBEDDED_CACHE = new Map();
93+
let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
94+
if (embeddedArray === undefined) {
95+
embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
96+
LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
97+
}
98+
return embeddedArray;
99+
}
100+
throw new Error('unreachable code');
101+
}
102+
103+
function nameSuffix(text: string | null | undefined): string {
104+
if (text == null) return '';
105+
const index = text.lastIndexOf('_Template');
106+
return '_' + (index === -1 ? text : text.substr(0, index));
70107
}
71108

72109
/**
73-
* This class is a debug version of Object literal so that we can have constructor name show up in
110+
* This class is a debug version of Object literal so that we can have constructor name show up
111+
* in
74112
* debug tools in ngDevMode.
75113
*/
76114
export const TViewConstructor = class TView implements ITView {
77115
constructor(
116+
public type: TViewType, //
78117
public id: number, //
79118
public blueprint: LView, //
80119
public template: ComponentTemplate<{}>|null, //
@@ -259,8 +298,10 @@ export function toDebug(obj: any): any {
259298
* reading.
260299
*
261300
* @param value possibly wrapped native DOM node.
262-
* @param includeChildren If `true` then the serialized HTML form will include child elements (same
263-
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element itself
301+
* @param includeChildren If `true` then the serialized HTML form will include child elements
302+
* (same
303+
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element
304+
* itself
264305
* (will not serialize child elements).
265306
*/
266307
function toHtml(value: any, includeChildren: boolean = false): string|null {
@@ -305,7 +346,8 @@ export class LViewDebug {
305346
get html(): string { return (this.nodes || []).map(node => toHtml(node.native, true)).join(''); }
306347
get context(): {}|null { return this._raw_lView[CONTEXT]; }
307348
/**
308-
* The tree of nodes associated with the current `LView`. The nodes have been normalized into a
349+
* The tree of nodes associated with the current `LView`. The nodes have been normalized into
350+
* a
309351
* tree structure with relevant details pulled out for readability.
310352
*/
311353
get nodes(): DebugNode[]|null {

packages/core/src/render3/instructions/shared.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {AttributeMarker, InitialInputData, InitialInputs, LocalRefExtractor, Pro
2727
import {RComment, RElement, RNode, RText, Renderer3, RendererFactory3, isProceduralRenderer} from '../interfaces/renderer';
2828
import {SanitizerFn} from '../interfaces/sanitization';
2929
import {isComponentDef, isComponentHost, isContentQueryHost, isLContainer, isRootView} from '../interfaces/type_checks';
30-
import {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view';
30+
import {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, TViewType, T_HOST} from '../interfaces/view';
3131
import {assertNodeOfPossibleTypes} from '../node_assert';
3232
import {isNodeMatchingSelectorList} from '../node_selector_matcher';
3333
import {ActiveElementFlags, enterView, executeElementExitFn, getBindingIndex, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getPreviousOrParentTNode, getSelectedIndex, hasActiveElementFlag, incrementActiveDirectiveId, leaveView, leaveViewProcessExit, setActiveHostElement, setBindingIndex, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setPreviousOrParentTNode, setSelectedIndex} from '../state';
@@ -40,7 +40,7 @@ import {getLViewParent} from '../util/view_traversal_utils';
4040
import {getComponentLViewByIndex, getNativeByIndex, getNativeByTNode, getTNode, isCreationMode, readPatchedLView, resetPreOrderHookFlags, unwrapRNode, viewAttachedToChangeDetector} from '../util/view_utils';
4141

4242
import {selectIndexInternal} from './advance';
43-
import {LCleanup, LViewBlueprint, MatchesArray, TCleanup, TNodeConstructor, TNodeInitialInputs, TNodeLocalNames, TViewComponents, TViewConstructor, attachLContainerDebug, attachLViewDebug, cloneToLView, cloneToTViewData} from './lview_debug';
43+
import {LCleanup, LViewBlueprint, MatchesArray, TCleanup, TNodeConstructor, TNodeInitialInputs, TNodeLocalNames, TViewComponents, TViewConstructor, attachLContainerDebug, attachLViewDebug, cloneToLViewFromTViewBlueprint, cloneToTViewData} from './lview_debug';
4444

4545

4646

@@ -158,7 +158,8 @@ export function createLView<T>(
158158
host: RElement | null, tHostNode: TViewNode | TElementNode | null,
159159
rendererFactory?: RendererFactory3 | null, renderer?: Renderer3 | null,
160160
sanitizer?: Sanitizer | null, injector?: Injector | null): LView {
161-
const lView = ngDevMode ? cloneToLView(tView.blueprint) : tView.blueprint.slice() as LView;
161+
const lView =
162+
ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice() as LView;
162163
lView[HOST] = host;
163164
lView[FLAGS] = flags | LViewFlags.CreationMode | LViewFlags.Attached | LViewFlags.FirstLViewPass;
164165
resetPreOrderHookFlags(lView);
@@ -568,10 +569,11 @@ export function saveResolvedLocalsInData(
568569
* @param def ComponentDef
569570
* @returns TView
570571
*/
571-
export function getOrCreateTView(def: ComponentDef<any>): TView {
572-
return def.tView || (def.tView = createTView(
573-
-1, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs,
574-
def.viewQuery, def.schemas, def.consts));
572+
export function getOrCreateTComponentView(def: ComponentDef<any>): TView {
573+
return def.tView ||
574+
(def.tView = createTView(
575+
TViewType.Component, -1, def.template, def.decls, def.vars, def.directiveDefs,
576+
def.pipeDefs, def.viewQuery, def.schemas, def.consts));
575577
}
576578

577579

@@ -588,8 +590,8 @@ export function getOrCreateTView(def: ComponentDef<any>): TView {
588590
* @param consts Constants for this view
589591
*/
590592
export function createTView(
591-
viewIndex: number, templateFn: ComponentTemplate<any>| null, decls: number, vars: number,
592-
directives: DirectiveDefListOrFactory | null, pipes: PipeDefListOrFactory | null,
593+
type: TViewType, viewIndex: number, templateFn: ComponentTemplate<any>| null, decls: number,
594+
vars: number, directives: DirectiveDefListOrFactory | null, pipes: PipeDefListOrFactory | null,
593595
viewQuery: ViewQueriesFunction<any>| null, schemas: SchemaMetadata[] | null,
594596
consts: TConstants | null): TView {
595597
ngDevMode && ngDevMode.tView++;
@@ -601,6 +603,7 @@ export function createTView(
601603
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
602604
return blueprint[TVIEW as any] = ngDevMode ?
603605
new TViewConstructor(
606+
type,
604607
viewIndex, // id: number,
605608
blueprint, // blueprint: LView,
606609
templateFn, // template: ComponentTemplate<{}>|null,
@@ -1304,7 +1307,7 @@ function baseResolveDirective<T>(tView: TView, viewData: LView, def: DirectiveDe
13041307

13051308
function addComponentLogic<T>(lView: LView, hostTNode: TElementNode, def: ComponentDef<T>): void {
13061309
const native = getNativeByTNode(hostTNode, lView) as RElement;
1307-
const tView = getOrCreateTView(def);
1310+
const tView = getOrCreateTComponentView(def);
13081311

13091312
// Only component views should be added to the view tree directly. Embedded views are
13101313
// accessed through their containers because they may be removed / re-added later.

packages/core/src/render3/interfaces/view.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,35 @@ export const enum PreOrderHookFlags {
310310
*/
311311
export interface ExpandoInstructions extends Array<number|HostBindingsFunction<any>|null> {}
312312

313+
/**
314+
* Explicitly marks `TView` as a specific type in `ngDevMode`
315+
*
316+
* It is useful to know conceptually what time of `TView` we are dealing with when
317+
* debugging an application (even if the runtime does not need it.) For this reason
318+
* we store this information in the `ngDevMode` `TView` and than use it for
319+
* better debugging experience.
320+
*/
321+
export const enum TViewType {
322+
/**
323+
* Root `TView` is the used to bootstrap components into. It is used in conjunction with
324+
* `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`
325+
* so that other components can be loaded into it.
326+
*/
327+
Root = 0,
328+
329+
/**
330+
* `TView` associated with a Component. This would be the `TView` directly associated with the
331+
* component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)
332+
*/
333+
Component = 1,
334+
335+
/**
336+
* `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`
337+
* can have zero or more `Embedede` `TView`s.
338+
*/
339+
Embedded = 2,
340+
}
341+
313342
/**
314343
* The static data for an LView (shared between all templates of a
315344
* given type).

packages/core/src/render3/util/discovery_utils.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,3 +370,20 @@ export function getDebugNode(element: Node): DebugNode|null {
370370

371371
return debugNode;
372372
}
373+
374+
/**
375+
* Retrieve the component `LView` from component/element.
376+
*
377+
* NOTE: `LView` is a private and should not be leaked outside.
378+
* Don't export this method to `ng.*` on window.
379+
*
380+
* @param target Component or Element instance.
381+
*/
382+
export function getComponentLView(target: any): LView {
383+
const lContext = loadLContext(target);
384+
const nodeIndx = lContext.nodeIndex;
385+
const lView = lContext.lView;
386+
const componentLView = lView[nodeIndx];
387+
ngDevMode && assertLView(componentLView);
388+
return componentLView;
389+
}

packages/core/src/util/named_array_type.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99

1010
import './ng_dev_mode';
11-
import {global} from './global';
1211

1312
/**
1413
* THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!

0 commit comments

Comments
 (0)