refactor(ivy): move id to TView (#24264)

PR Close #24264
This commit is contained in:
Kara Erickson
2018-06-01 19:28:20 -07:00
committed by Victor Berchet
parent cb65724761
commit 5794506c64
6 changed files with 35 additions and 26 deletions

View File

@ -49,13 +49,6 @@ export interface LView {
// TODO(kara): Remove when we have parent/child on TNodes
readonly node: LViewNode|LElementNode;
/**
* ID to determine whether this view is the same as the previous view
* in this position. If it's not, we know this view needs to be inserted
* and the one that exists needs to be removed (e.g. if/else statements)
*/
readonly id: number;
/** Renderer to be used for this view. */
readonly renderer: Renderer3;
@ -207,6 +200,15 @@ export interface LViewOrLContainer {
* Stored on the template function as ngPrivateData.
*/
export interface TView {
/**
* ID for inline views to determine whether a view is the same as the previous view
* in a certain position. If it's not, we know the new view needs to be inserted
* and the one that exists needs to be removed (e.g. if/else statements)
*
* If this is -1, then this is a component view or a dynamically created view.
*/
readonly id: number;
/**
* Pointer to the `TNode` that represents the root of the view.
*