fix(compiler): fix for element needing implicit parent placed in top-level ng-container

fixes #18314
This commit is contained in:
Victor Berchet
2017-07-26 14:53:59 -07:00
committed by Alex Rickabaugh
parent ebef5e697a
commit 381471d338
3 changed files with 285 additions and 281 deletions

View File

@ -152,6 +152,16 @@ export function main() {
]);
});
it('should append the required parent considering top level ng-container', () => {
expect(humanizeDom(
parser.parse('<ng-container><tr></tr></ng-container><p></p>', 'TestComp')))
.toEqual([
[html.Element, 'ng-container', 0],
[html.Element, 'tr', 1],
[html.Element, 'p', 0],
]);
});
it('should special case ng-container when adding a required parent', () => {
expect(humanizeDom(parser.parse(
'<table><thead><ng-container><tr></tr></ng-container></thead></table>',