Skip to content

Commit 9a70f1a

Browse files
committed
fix(TemplateParser): do not match on attrs that are bindings
Closes angular#5914
1 parent 8516473 commit 9a70f1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/angular2/src/compiler/template_parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,13 @@ class TemplateParseVisitor implements HtmlAstVisitor {
210210
var attrs = [];
211211

212212
element.attrs.forEach(attr => {
213-
matchableAttrs.push([attr.name, attr.value]);
214213
var hasBinding = this._parseAttr(attr, matchableAttrs, elementOrDirectiveProps, events, vars);
215214
var hasTemplateBinding = this._parseInlineTemplateBinding(
216215
attr, templateMatchableAttrs, templateElementOrDirectiveProps, templateVars);
217216
if (!hasBinding && !hasTemplateBinding) {
218217
// don't include the bindings as attributes as well in the AST
219218
attrs.push(this.visitAttr(attr, null));
219+
matchableAttrs.push([attr.name, attr.value]);
220220
}
221221
if (hasTemplateBinding) {
222222
hasInlineTemplates = true;

0 commit comments

Comments
 (0)