W3C验证为< UI选> [英] W3C validation for <ui-select>

查看:113
本文介绍了W3C验证为< UI选>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用一个网站,在风格选择字段配置了自己的内角UI的选择指定的标记 UI选。这个伟大的工程,但做一个 W3C验证导致这个错误:

I am using angular-ui-select within a website where the styled select fields are configured with an own tag named ui-select. This works great, but doing a W3C validation leads to this error:

元素 UI选不允许在此背景下元素 DIV 的孩子。 (SUP pressing从这个子树更多的错误。)

Element ui-select not allowed as child of element div in this context. (Suppressing further errors from this subtree.)

下面是一个例子code:

Here's an example code:

<!doctype html>
<html lang="en">
<head><title>x</title></head>
<body>
 <div>
  <ui-select></ui-select>
 </div>
</body></html>

据我所知,&LT; UI选&GT; 预计不会在那里,但我怎么能处理这更好的。

I understand that <ui-select> is not expected to be there but how can I handle this better?

我能把它变成一个不同的标签或者是有一种不同的方法 UI选的,而不是使用HTML标记?

Can I wrap it into a different tag or is there a different approach for ui-select instead of using HTML markup?

推荐答案

这的确是一个长期的已知问题AngularJS。

That's indeed a long-known issue with AngularJS.

有几件事情可以做:

而不是使用元素的&LT; UI选&GT; ,您可以用&LT;格UI选&GT; ,但仍然会失败的说法。

Instead of using the element <ui-select>, you can use <div ui-select>, but that will still fail on the argument.

这是自变量prefixed与 X - 或数据 - 将传递,但我不知道 UI选支持。

An argument prefixed with x- or data- will pass but I am not sure ui-select supports that.

HTML W3C验证是非常有用的,但我认为对HTML电子邮件大多是重要的,所以它们不会得到筛选为垃圾邮件。这也是很好的搜索引擎,但真的不的的关键。

HTML W3C validation is useful, but I think mostly important for HTML emails so they don't get screened as spam. It's also good for search engines, but really not that critical.

如果你看一下为什么验证,原因大多为清洁,缓解调试和整体良好做法。

If you look at 'why validate', the reasons are mostly for cleanliness, ease of debugging, and overall good practice.

角(UN?)幸运的是扩大了对HTML5的可能性境界,在某种程度上,自然,从HTML的最新规格偏离。

Angular (un?)fortunately expands the realm of possibilities for HTML5, in a way that, naturally, deviates from the latest specifications for HTML.

这篇关于W3C验证为&LT; UI选&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆