2014-10-30 14:41:19 -07:00
|
|
|
import {ProtoElementInjector} from './element_injector';
|
|
|
|
import {FIELD} from 'facade/lang';
|
2014-11-13 15:15:55 -08:00
|
|
|
import {AnnotatedType} from './annotated_type';
|
2014-11-11 17:33:47 -08:00
|
|
|
// Comment out as dartanalyzer does not look into @FIELD
|
|
|
|
// import {List} from 'facade/collection';
|
|
|
|
// import {ProtoView} from './view';
|
2014-10-30 14:41:19 -07:00
|
|
|
|
|
|
|
export class ElementBinder {
|
|
|
|
@FIELD('final protoElementInjector:ProtoElementInjector')
|
2014-11-13 15:15:55 -08:00
|
|
|
@FIELD('final componentDirective:AnnotatedType')
|
|
|
|
@FIELD('final templateDirective:AnnotatedType')
|
2014-10-30 14:41:19 -07:00
|
|
|
@FIELD('final textNodeIndices:List<int>')
|
2014-11-11 17:33:47 -08:00
|
|
|
@FIELD('hasElementPropertyBindings:bool')
|
2014-11-13 15:15:55 -08:00
|
|
|
constructor(protoElementInjector: ProtoElementInjector, componentDirective:AnnotatedType, templateDirective:AnnotatedType) {
|
2014-11-11 17:33:47 -08:00
|
|
|
this.protoElementInjector = protoElementInjector;
|
2014-11-13 15:15:55 -08:00
|
|
|
this.componentDirective = componentDirective;
|
|
|
|
this.templateDirective = templateDirective;
|
2014-11-11 17:33:47 -08:00
|
|
|
// updated later when text nodes are bound
|
|
|
|
this.textNodeIndices = [];
|
|
|
|
// updated later when element properties are bound
|
|
|
|
this.hasElementPropertyBindings = false;
|
|
|
|
// updated later, so we are able to resolve cycles
|
|
|
|
this.nestedProtoView = null;
|
2014-10-30 14:41:19 -07:00
|
|
|
}
|
|
|
|
}
|