我正在使用ng-cloak隐藏页面加载的内容,但它无法正常工作。 我的代码是:
<div class="col-lg-12" ng-hide="searchForm">
<div class="panel-heading">SELECT USERS FOR NOMINATIONS IN TRAINING</div>
<div ng-show="nominateUsers">
<div class="panel-body">
<select multiple ng-model="cattraining.user_id" style="width:300px; height:150px">
<option ng-repeat="user in nominateUsers" value="{{user.id}}">{{user.name}}
</option>
</select>
</div>
<div class="panel-body">
<a href="#" class="btn btn-primary" ng-click="fnominateUser(cattraining)">SUBMIT</a>
</div>
</div>
<div class="panel-body" ng-show="!nominateUsers" ng-cloak>
<div class="alert" ng-cloak><strong>Oops, </strong>You don't have any user to nominate</div>
</div>
</div>
提前致谢。
答案 0 :(得分:1)
您是否添加了与ngCloak指令相关的CSS代码?
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}