refactor(ivy): treate LView as the primary global state (#27282)

- rename `LViewData` to `LView` (to be consistent with `TView`)
- Remove `getRenderer`, `getRendererFactory`, `getTview`, `getCurrentQueries`,

PR Close #27282
This commit is contained in:
Misko Hevery
2018-11-21 21:14:06 -08:00
committed by Igor Minar
parent 4354fce2bb
commit 816ec0b1c3
56 changed files with 1217 additions and 1326 deletions

View File

@ -7,7 +7,7 @@
*/
import {StylingContext} from './styling';
import {LViewData, TView} from './view';
import {LView, TView} from './view';
/**
@ -103,7 +103,7 @@ export interface TNode {
type: TNodeType;
/**
* Index of the TNode in TView.data and corresponding native element in LViewData.
* Index of the TNode in TView.data and corresponding native element in LView.
*
* This is necessary to get from any TNode to its corresponding native element when
* traversing the node tree.
@ -113,7 +113,7 @@ export interface TNode {
index: number;
/**
* The index of the closest injector in this node's LViewData.
* The index of the closest injector in this node's LView.
*
* If the index === -1, there is no injector on this node or any ancestor node in this view.
*
@ -361,7 +361,7 @@ export interface TContainerNode extends TNode {
/** Static data for an <ng-container> */
export interface TElementContainerNode extends TNode {
/** Index in the LViewData[] array. */
/** Index in the LView[] array. */
index: number;
child: TElementNode|TTextNode|TContainerNode|TElementContainerNode|TProjectionNode|null;
parent: TElementNode|TElementContainerNode|null;
@ -371,7 +371,7 @@ export interface TElementContainerNode extends TNode {
/** Static data for an ICU expression */
export interface TIcuContainerNode extends TNode {
/** Index in the LViewData[] array. */
/** Index in the LView[] array. */
index: number;
child: TElementNode|TTextNode|null;
parent: TElementNode|TElementContainerNode|null;
@ -481,4 +481,4 @@ export type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContain
* - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;
* - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;
*/
export type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LViewData) => any;
export type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;