import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection'; import {AST, Locals, ChangeDispatcher, ProtoChangeDetector, ChangeDetector, ChangeRecord, BindingRecord, DirectiveRecord, DirectiveIndex, ChangeDetectorRef} from 'angular2/change_detection'; import {ProtoElementInjector, ElementInjector, PreBuiltObjects, DirectiveBinding} from './element_injector'; import {ElementBinder} from './element_binder'; import {SetterFn} from 'angular2/src/reflection/types'; import {IMPLEMENTS, int, isPresent, isBlank, BaseException} from 'angular2/src/facade/lang'; import * as renderApi from 'angular2/src/render/api'; export class AppViewContainer { views: List; constructor() { // The order in this list matches the DOM order. this.views = []; } } /** * Const of making objects: http://jsperf.com/instantiate-size-of-object * */ @IMPLEMENTS(ChangeDispatcher) // TODO(tbosch): this is not supported in dart2js (no '.' is allowed) // @IMPLEMENTS(renderApi.EventDispatcher) export class AppView { 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. imperativeHostViews: List; viewContainers: List; preBuiltObjects: List; proto: AppProtoView; renderer: renderApi.Renderer; /** * 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 `