@ -22,6 +22,7 @@ export class CompileElement {
|
||||
textNodeBindings:Map;
|
||||
propertyBindings:Map;
|
||||
eventBindings:Map;
|
||||
attributes:Map;
|
||||
|
||||
/// Store directive name to template name mapping.
|
||||
/// Directive name is what the directive exports the variable as
|
||||
@ -144,6 +145,13 @@ export class CompileElement {
|
||||
MapWrapper.set(this.eventBindings, eventName, expression);
|
||||
}
|
||||
|
||||
addAttribute(attributeName:string, attributeValue:string) {
|
||||
if (isBlank(this.attributes)) {
|
||||
this.attributes = MapWrapper.create();
|
||||
}
|
||||
MapWrapper.set(this.attributes, attributeName, attributeValue);
|
||||
}
|
||||
|
||||
addDirective(directive:DirectiveMetadata) {
|
||||
var annotation = directive.annotation;
|
||||
this._allDirectives = null;
|
||||
|
@ -72,6 +72,8 @@ export class PropertyBindingParser extends CompileStep {
|
||||
var ast = this._parseInterpolation(attrValue, desc);
|
||||
if (isPresent(ast)) {
|
||||
current.addPropertyBinding(attrName, ast);
|
||||
} else {
|
||||
current.addAttribute(attrName, attrValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -59,6 +59,7 @@ export class ProtoElementInjectorBuilder extends CompileStep {
|
||||
current.inheritedProtoElementInjector.exportImplicitName = exportImplicitName;
|
||||
}
|
||||
}
|
||||
current.inheritedProtoElementInjector.attributes = current.attributes;
|
||||
|
||||
} else {
|
||||
current.inheritedProtoElementInjector = parentProtoElementInjector;
|
||||
|
Reference in New Issue
Block a user