From 9a70f1a1d9277135289c096f96a12a8854bdc9f3 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 15 Dec 2015 09:39:07 -0800 Subject: [PATCH] fix(TemplateParser): do not match on attrs that are bindings Closes #5914 --- modules/angular2/src/compiler/template_parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/angular2/src/compiler/template_parser.ts b/modules/angular2/src/compiler/template_parser.ts index 59d29d54b2..c93307378b 100644 --- a/modules/angular2/src/compiler/template_parser.ts +++ b/modules/angular2/src/compiler/template_parser.ts @@ -210,13 +210,13 @@ class TemplateParseVisitor implements HtmlAstVisitor { var attrs = []; element.attrs.forEach(attr => { - matchableAttrs.push([attr.name, attr.value]); var hasBinding = this._parseAttr(attr, matchableAttrs, elementOrDirectiveProps, events, vars); var hasTemplateBinding = this._parseInlineTemplateBinding( attr, templateMatchableAttrs, templateElementOrDirectiveProps, templateVars); if (!hasBinding && !hasTemplateBinding) { // don't include the bindings as attributes as well in the AST attrs.push(this.visitAttr(attr, null)); + matchableAttrs.push([attr.name, attr.value]); } if (hasTemplateBinding) { hasInlineTemplates = true;