refactor(core): Remove host TNode
from getOrCreateTNode
(#38707)
Host `TNode` was passed into `getOrCreateTNode` just so that we can compute weather or not we are a root node. This was needed because `previousOrParentTNode` could have `TNode` from `TView` other then current `TView`. This is confusing mental model. Previous change ensured that `previousOrParentTNode` must always be part of `TView`, which enabled this change to remove the unneeded argument. PR Close #38707
This commit is contained in:
@ -278,7 +278,7 @@ export function renderTemplate<T>(
|
||||
def.pipeDefs = pipes || null;
|
||||
|
||||
const componentTView = getOrCreateTComponentView(def);
|
||||
const hostTNode = getOrCreateTNode(tView, hostLView[T_HOST], 0, TNodeType.Element, null, null);
|
||||
const hostTNode = getOrCreateTNode(tView, 0, TNodeType.Element, null, null);
|
||||
hostLView[hostTNode.index] = hostNode;
|
||||
componentView = createLView(
|
||||
hostLView, componentTView, context, LViewFlags.CheckAlways, hostNode, hostTNode,
|
||||
|
Reference in New Issue
Block a user