[英]AngularJS - html rendering and ng-bind-html-unsafe
Hi guys I have a bit problem with angularJS html rendering. 嗨,大家好,我对angularJS html渲染有一些疑问。 The problem is when I use
ng-bind-html-unsafe
, the layout looks completely wrong. 问题是当我使用
ng-bind-html-unsafe
,布局看起来完全错误。 But then, I just hover the mouse around that area, everything just moves to its correct place. 但是,然后,我将鼠标悬停在该区域上,一切都移动到了正确的位置。 So somehow, I guess it has something related to angularJS custom attribute because things are completely fine without
ng-bind-html-unsafe
. 所以以某种方式,我想它与angularJS自定义属性有关,因为如果没有
ng-bind-html-unsafe
一切都会很好。
<li><a href="#!/static/faq"
ng-bind-html-unsafe="locale['static-faq']"></a></li>
<li><a href="#!/static/privacy-policy"
ng-bind-html-unsafe="locale['static-privacy-policy']"></a></li>
<li><a href="#!/static/terms"
ng-bind-html-unsafe="locale['static-terms']"></a></li>
<li><a href="#!/static/contact"
ng-bind-html-unsafe="locale['static-contact']"></a></li>
<li><a href="#!/static/team"
ng-bind-html-unsafe="locale['static-team']"></a></li>
It turns out to not to be problem from angularJS. 事实证明,angularJS没问题。 It's because of
text-decoration: uppercase
which I didn't expect it to be a problem. 这是因为
text-decoration: uppercase
,我没想到这是个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.