Skip to content

Commit

Permalink
fix(TemplateParser): do not match on attrs that are bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Dec 24, 2015
1 parent 8516473 commit 9a70f1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/angular2/src/compiler/template_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9a70f1a

Please sign in to comment.