refactor(ivy): remove LNode.view (#25988)

PR Close #25988
This commit is contained in:
Kara Erickson
2018-09-17 14:32:45 -07:00
committed by Ben Lesh
parent 5653874683
commit f47f2628e1
14 changed files with 172 additions and 159 deletions

View File

@ -8,7 +8,7 @@
import {devModeEqual} from '../change_detection/change_detection_util';
import {assertLessThan} from './assert';
import {LElementNode, TNode, TNodeFlags} from './interfaces/node';
import {LContainerNode, LElementContainerNode, LElementNode, TNode, TNodeFlags} from './interfaces/node';
import {HEADER_OFFSET, LViewData, TData} from './interfaces/view';
/**
@ -91,6 +91,11 @@ export function readElementValue(value: LElementNode | any[]): LElementNode {
return (Array.isArray(value) ? (value as any as any[])[0] : value) as LElementNode;
}
export function getLNode(tNode: TNode, hostView: LViewData): LElementNode|LContainerNode|
LElementContainerNode {
return readElementValue(hostView[tNode.index]);
}
export function isContentQueryHost(tNode: TNode): boolean {
return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;
}