fix(HtmlParser): do not add required parents to template root elements
fixes #5967
This commit is contained in:
@ -36,7 +36,6 @@ export function main() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('elements', () => {
|
||||
it('should parse root level elements', () => {
|
||||
expect(humanizeDom(parser.parse('<div></div>', 'TestComp'))).toEqual([
|
||||
@ -158,6 +157,13 @@ export function main() {
|
||||
]);
|
||||
});
|
||||
|
||||
// https://github.com/angular/angular/issues/5967
|
||||
it('should not add the requiredParent to a template root element', () => {
|
||||
expect(humanizeDom(parser.parse('<tr></tr>', 'TestComp'))).toEqual([
|
||||
[HtmlElementAst, 'tr', 0],
|
||||
]);
|
||||
});
|
||||
|
||||
it('should support explicit mamespace', () => {
|
||||
expect(humanizeDom(parser.parse('<myns:div></myns:div>', 'TestComp'))).toEqual([
|
||||
[HtmlElementAst, ':myns:div', 0]
|
||||
|
Reference in New Issue
Block a user