fix(TemplateParser): add support for data-template attribute

fixes #9904
This commit is contained in:
Victor Berchet
2016-07-08 10:09:49 -07:00
parent 9a1babb30c
commit d84a43c828
2 changed files with 7 additions and 1 deletions

View File

@ -431,7 +431,7 @@ class TemplateParseVisitor implements HtmlAstVisitor {
attr: HtmlAttrAst, targetMatchableAttrs: string[][],
targetProps: BoundElementOrDirectiveProperty[], targetVars: VariableAst[]): boolean {
let templateBindingsSource: string = null;
if (attr.name == TEMPLATE_ATTR) {
if (this._normalizeAttributeName(attr.name) == TEMPLATE_ATTR) {
templateBindingsSource = attr.value;
} else if (attr.name.startsWith(TEMPLATE_ATTR_PREFIX)) {
const key = attr.name.substring(TEMPLATE_ATTR_PREFIX.length); // remove the star