import { ListWrapper, MapWrapper, Map, StringMapWrapper, } from 'angular2/src/facade/collection'; import { ChangeDetector, ChangeDispatcher, DirectiveIndex, BindingTarget, Locals, ProtoChangeDetector, ChangeDetectorRef } from 'angular2/src/core/change_detection/change_detection'; import {ResolvedProvider, Injectable, Injector} from 'angular2/src/core/di'; import {DebugContext} from 'angular2/src/core/change_detection/interfaces'; import {AppProtoElement, AppElement, DirectiveProvider} from './element'; import { isPresent, isBlank, Type, isArray, isNumber, CONST, CONST_EXPR } from 'angular2/src/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; import {Renderer, RootRenderer, RenderDebugInfo} from 'angular2/src/core/render/api'; import {ViewRef_, HostViewFactoryRef} from './view_ref'; import {ProtoPipes} from 'angular2/src/core/pipes/pipes'; import {camelCaseToDashCase} from 'angular2/src/core/render/util'; export {DebugContext} from 'angular2/src/core/change_detection/interfaces'; import {Pipes} from 'angular2/src/core/pipes/pipes'; import {AppViewManager_, AppViewManager} from './view_manager'; import {ResolvedMetadataCache} from './resolved_metadata_cache'; import {ViewType} from './view_type'; const REFLECT_PREFIX: string = 'ng-reflect-'; const EMPTY_CONTEXT = CONST_EXPR(new Object()); /** * Cost of making objects: http://jsperf.com/instantiate-size-of-object * */ export class AppView implements ChangeDispatcher { ref: ViewRef_; rootNodesOrAppElements: any[]; allNodes: any[]; disposables: Function[]; appElements: AppElement[]; /** * The context against which data-binding expressions in this view are evaluated against. * This is always a component instance. */ context: any = null; /** * Variables, local to this view, that can be used in binding expressions (in addition to the * context). This is used for thing like `