diff --git a/modules/angular2/src/core/compiler/template_parser.ts b/modules/angular2/src/core/compiler/template_parser.ts index d1918833a7..107dbe2858 100644 --- a/modules/angular2/src/core/compiler/template_parser.ts +++ b/modules/angular2/src/core/compiler/template_parser.ts @@ -272,6 +272,7 @@ class TemplateParseVisitor implements HtmlAstVisitor { targetMatchableAttrs, targetProps); } else { targetMatchableAttrs.push([dashCaseKey, '']); + this._parseLiteralAttr(dashCaseKey, null, attr.sourceInfo, targetProps); } } return true; diff --git a/modules/angular2/test/core/compiler/template_parser_spec.ts b/modules/angular2/test/core/compiler/template_parser_spec.ts index efa1b8aa44..f00d9ebcc5 100644 --- a/modules/angular2/test/core/compiler/template_parser_spec.ts +++ b/modules/angular2/test/core/compiler/template_parser_spec.ts @@ -670,6 +670,17 @@ There is no directive with "exportAs" set to "dirA" at TestComp > div:nth-child( [ElementAst, 'div', 'TestComp > div:nth-child(0)'] ]); }); + + it('should work with *... and empty value', () => { + expect(humanizeTemplateAsts(parse('
', [ngIf]))) + .toEqual([ + [EmbeddedTemplateAst, 'TestComp > div:nth-child(0)'], + [DirectiveAst, ngIf, 'TestComp > div:nth-child(0)'], + [BoundDirectivePropertyAst, 'ngIf', 'null', 'TestComp > div:nth-child(0)[*ng-if=]'], + [ElementAst, 'div', 'TestComp > div:nth-child(0)'] + ]); + }); + }); });