ng-show内容在页面加载过程中闪烁,尽管它不是真实的,并且ng-cloak不适用于FF

ng-show content blinks during page load though it is not truthy and ng-cloak doesn't work with FF

本文关键字:真实 并且 FF 适用于 不适用 ng-cloak 加载 ng-show 闪烁 过程中      更新时间:2023-09-26
<div ng-show="IsExists" ng-cloak>
 <span>The value is exists</span>
</div>

然后我在我的应用程序中添加了以下行.css

但我仍然看到 ng-show 块的初始闪烁

[ng':cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
  display: none !important;
}

以上内容在火狐浏览器上不起作用。

使用ng-if它根本不会被加载到 DOM 中。 ng-show适用于display: none ng-if从 DOM 中删除。

相关文章: