仅供参考:我的棱角是
<% %>
我有以下html:
<div class="modal-body">
<div class="form-group">
<label for="UserID">User</label>
<select ng-model="SelectedUser" ng-change="ChangedUserSelection()" name="UserID" id="user-selector" >
<option ng-repeat="item in Users" value="<%item.id%>"><%item.first_name%> <%item.last_name%></option>
</select>
</div><br />
<div class="privilege-options" ng-if="SelectedUser != null" >
</div>
</div>
如果选择框没有选中任何内容,我想隐藏privilege-options
。我该怎么做?
答案 0 :(得分:1)
解决您的问题:
更改强>:
ng-if="SelectedUser != null"`<br>
要强>:
ng-if="!SelectedUser"