fix(HtmlParser): ng-content is not a void element
fixes #5563 Closes #5586
This commit is contained in:
@ -689,6 +689,12 @@ There is no directive with "exportAs" set to "dirA" ("<div [ERROR ->]#a="dirA"><
|
||||
});
|
||||
|
||||
describe('error cases', () => {
|
||||
it('should report when ng-content has content', () => {
|
||||
expect(() => parse('<ng-content>content</ng-content>', []))
|
||||
.toThrowError(`Template parse errors:
|
||||
<ng-content> element cannot have content. <ng-content> must be immediately followed by </ng-content> ("[ERROR ->]<ng-content>content</ng-content>"): TestComp@0:0`);
|
||||
});
|
||||
|
||||
it('should report invalid property names', () => {
|
||||
expect(() => parse('<div [invalid-prop]></div>', [])).toThrowError(`Template parse errors:
|
||||
Can't bind to 'invalidProp' since it isn't a known native property ("<div [ERROR ->][invalid-prop]></div>"): TestComp@0:5`);
|
||||
|
Reference in New Issue
Block a user