Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aurelia: self-closing require element does not work

Tags:

html

aurelia

Why can't Aurelia deal with self-closing require elements?

For example:

<require from="component"></require> works

<require from="component"/> doesn't work

No error is given, yet the entire template will fail if you try to use the self-closing element.

like image 617
Meirion Hughes Avatar asked May 18 '16 13:05

Meirion Hughes


1 Answers

According to the HTML specification, there are just a few void elements (elements that only have a start tag), which are:

area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr.

https://www.w3.org/TR/html5/syntax.html#void-elements.

Aurelia uses the browser's native DOMParser, which means it follows the same set of standards.

like image 115
Fabio Luz Avatar answered Nov 15 '22 21:11

Fabio Luz