fix(TemplateParser): do not match on attrs that are bindings

Closes #5914
This commit is contained in:
Victor Berchet 2015-12-15 09:39:07 -08:00
parent 8516473340
commit 9a70f1a1d9
1 changed files with 1 additions and 1 deletions

View File

@ -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;