import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection'; import { AST, Locals, ChangeDispatcher, ProtoChangeDetector, ChangeDetector, BindingRecord, DirectiveRecord, DirectiveIndex, ChangeDetectorRef } from 'angular2/change_detection'; import { ProtoElementInjector, ElementInjector, PreBuiltObjects, DirectiveBinding } from './element_injector'; import {ElementBinder} from './element_binder'; import {isPresent, isBlank, BaseException} from 'angular2/src/facade/lang'; import * as renderApi from 'angular2/src/render/api'; import {EventDispatcher} from 'angular2/src/render/api'; export class AppViewContainer { // The order in this list matches the DOM order. views: List = []; freeViews: List = []; } /** * Const of making objects: http://jsperf.com/instantiate-size-of-object * */ export class AppView implements ChangeDispatcher, EventDispatcher { render: renderApi.RenderViewRef; /// This list matches the _nodes list. It is sparse, since only Elements have ElementInjector rootElementInjectors: List; elementInjectors: List; changeDetector: ChangeDetector; componentChildViews: List; /// Host views that were added by an imperative view. /// This is a dynamically growing / shrinking array. freeHostViews: List; viewContainers: List; preBuiltObjects: List; /** * The context against which data-binding expressions in this view are evaluated against. * This is always a component instance. */ context: any; /** * Variables, local to this view, that can be used in binding expressions (in addition to the * context). This is used for thing like `