angular-cn/modules/core/src/compiler/element_binder.js

31 lines
1.1 KiB
JavaScript
Raw Normal View History

import {ProtoElementInjector} from './element_injector';
import {FIELD} from 'facade/lang';
2014-11-19 14:54:07 -08:00
import {MapWrapper} from 'facade/collection';
import {AnnotatedType} from './annotated_type';
import {List, Map} from 'facade/collection';
import {ProtoView} from './view';
export class ElementBinder {
protoElementInjector:ProtoElementInjector;
componentDirective:AnnotatedType;
templateDirective:AnnotatedType;
textNodeIndices:List<int>;
hasElementPropertyBindings:boolean;
nestedProtoView: ProtoView;
events:Map;
2014-11-19 14:54:07 -08:00
constructor(
protoElementInjector: ProtoElementInjector, componentDirective:AnnotatedType, templateDirective:AnnotatedType) {
this.protoElementInjector = protoElementInjector;
this.componentDirective = componentDirective;
this.templateDirective = templateDirective;
2014-11-19 14:54:07 -08:00
// updated later when events are bound
this.events = null;
// updated later when text nodes are bound
2014-11-19 14:54:07 -08:00
this.textNodeIndices = null;
// updated later when element properties are bound
this.hasElementPropertyBindings = false;
// updated later, so we are able to resolve cycles
this.nestedProtoView = null;
}
}