Reputation: 11
I am using ng-cloak to hide the content on page load but it is not working. My code is:
<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>
Thanks in advance.
Upvotes: 1
Views: 220
Reputation: 14440
Have you added the CSS code related to the ngCloak directive ?
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
Source : https://docs.angularjs.org/api/ng/directive/ngCloak
Upvotes: 1