Aurelia: self-closing require element does not work

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 12:46:48

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/37300986/aurelia-self-closing-require-element-does-not-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!