fix(compiler): add ability to parse : in * directives

- Add ability to parse bindings properly when `:` is present when using a directive with the `*` prefix

Closes #6038
This commit is contained in:
Wesley Cho
2015-12-20 09:56:00 -05:00
committed by Misko Hevery
parent 62dd3ceb64
commit 53628e19ac
2 changed files with 16 additions and 2 deletions
@@ -414,7 +414,9 @@ class TemplateParseVisitor implements HtmlAstVisitor {
templateBindingsSource = attr.value;
} else if (attr.name.startsWith(TEMPLATE_ATTR_PREFIX)) {
var key = attr.name.substring(TEMPLATE_ATTR_PREFIX.length); // remove the star
templateBindingsSource = (attr.value.length == 0) ? key : key + ' ' + attr.value;
templateBindingsSource = (attr.value.length == 0) ?
key :
key + ' ' + StringWrapper.replaceAll(attr.value, /:/g, ' ');
}
if (isPresent(templateBindingsSource)) {
var bindings = this._parseTemplateBindings(templateBindingsSource, attr.sourceSpan);