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

30 lines
1.2 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';
// Comment out as dartanalyzer does not look into @FIELD
// import {List} from 'facade/collection';
// import {ProtoView} from './view';
export class ElementBinder {
@FIELD('final protoElementInjector:ProtoElementInjector')
@FIELD('final componentDirective:AnnotatedType')
@FIELD('final templateDirective:AnnotatedType')
@FIELD('final textNodeIndices:List<int>')
@FIELD('hasElementPropertyBindings:bool')
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;
}
}