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

@ -949,6 +949,12 @@ Reference "#a" is defined several times ("<div #a></div><div [ERROR ->]#a></div>
]))).toEqual([[EmbeddedTemplateAst], [ElementAst, 'div']]);
});
it('should wrap the element with data-template attribute into an EmbeddedTemplateAST ',
() => {
expect(humanizeTplAst(parse('<div data-template>', [
]))).toEqual([[EmbeddedTemplateAst], [ElementAst, 'div']]);
});
it('should parse bound properties', () => {
expect(humanizeTplAst(parse('<div template="ngIf test">', [ngIf]))).toEqual([
[EmbeddedTemplateAst], [DirectiveAst, ngIf],