feat(HtmlParser): enforce only void & foreign elts can be self closed
BREAKING CHANGE: `<whatever />` used to be expanded to `<whatever></whatever>`. The parser now follows the HTML5 spec more closely. Only void and foreign elements can be self closed. Closes #5591
This commit is contained in:
@ -728,8 +728,8 @@ Parser Error: Unexpected token 'b' at column 3 in [a b] in TestComp@0:5 ("<div [
|
||||
type: new CompileTypeMetadata({name: 'DirB'}),
|
||||
template: new CompileTemplateMetadata({ngContentSelectors: []})
|
||||
});
|
||||
expect(() => parse('<div/>', [dirB, dirA])).toThrowError(`Template parse errors:
|
||||
More than one component: DirB,DirA ("[ERROR ->]<div/>"): TestComp@0:0`);
|
||||
expect(() => parse('<div>', [dirB, dirA])).toThrowError(`Template parse errors:
|
||||
More than one component: DirB,DirA ("[ERROR ->]<div>"): TestComp@0:0`);
|
||||
});
|
||||
|
||||
it('should not allow components or element bindings nor dom events on explicit embedded templates',
|
||||
|
Reference in New Issue
Block a user