diff --git a/modules/angular2/src/core/compiler/pipeline/directive_parser.js b/modules/angular2/src/core/compiler/pipeline/directive_parser.js index cf093dee1d..6117eae2e8 100644 --- a/modules/angular2/src/core/compiler/pipeline/directive_parser.js +++ b/modules/angular2/src/core/compiler/pipeline/directive_parser.js @@ -52,27 +52,16 @@ export class DirectiveParser extends CompileStep { for (var i=0; i < classList.length; i++) { cssSelector.addClassName(classList[i]); } + MapWrapper.forEach(attrs, (attrValue, attrName) => { - if (isBlank(current.propertyBindings) || - isPresent(current.propertyBindings) && !MapWrapper.contains(current.propertyBindings, attrName)) { - cssSelector.addAttribute(attrName, attrValue); - } + cssSelector.addAttribute(attrName, attrValue); }); - if (isPresent(current.propertyBindings)) { - MapWrapper.forEach(current.propertyBindings, (expression, prop) => { - cssSelector.addAttribute(prop, expression.source); - }); - } - if (isPresent(current.variableBindings)) { - MapWrapper.forEach(current.variableBindings, (value, name) => { - cssSelector.addAttribute(name, value); - }); - } + // Note: We assume that the ViewSplitter already did its work, i.e. template directive should // only be present on