diff --git a/modules/angular2/src/core/compiler/template_parser.ts b/modules/angular2/src/core/compiler/template_parser.ts index 4817ac6202..7847b457d3 100644 --- a/modules/angular2/src/core/compiler/template_parser.ts +++ b/modules/angular2/src/core/compiler/template_parser.ts @@ -295,8 +295,7 @@ class TemplateParseVisitor implements HtmlAstVisitor { } else if (isPresent( bindParts[2])) { // match: var-name / var-name="iden" / #name / #name="iden" var identifier = bindParts[5]; - this._parseVariable(identifier, attrValue, attr.sourceInfo, targetMatchableAttrs, - targetVars); + this._parseVariable(identifier, attrValue, attr.sourceInfo, targetVars); } else if (isPresent(bindParts[3])) { // match: on-event this._parseEvent(bindParts[5], attrValue, attr.sourceInfo, targetMatchableAttrs, @@ -338,9 +337,8 @@ class TemplateParseVisitor implements HtmlAstVisitor { } private _parseVariable(identifier: string, value: string, sourceInfo: any, - targetMatchableAttrs: string[][], targetVars: VariableAst[]) { + targetVars: VariableAst[]) { targetVars.push(new VariableAst(dashCaseToCamelCase(identifier), value, sourceInfo)); - targetMatchableAttrs.push([identifier, value]); } private _parseProperty(name: string, expression: string, sourceInfo: any, diff --git a/modules/angular2/test/core/compiler/template_parser_spec.ts b/modules/angular2/test/core/compiler/template_parser_spec.ts index bae38463be..50ed6dfea4 100644 --- a/modules/angular2/test/core/compiler/template_parser_spec.ts +++ b/modules/angular2/test/core/compiler/template_parser_spec.ts @@ -379,19 +379,6 @@ export function main() { ]); }); - it('should locate directives in variable bindings', () => { - var dirA = CompileDirectiveMetadata.create( - {selector: '[a=b]', exportAs: 'b', type: new CompileTypeMetadata({name: 'DirA'})}); - var dirB = CompileDirectiveMetadata.create( - {selector: '[b]', type: new CompileTypeMetadata({name: 'DirB'})}); - expect(humanizeTemplateAsts(parse('