如果我点击页面中的任何地方,下拉应该关闭,我做了角度代码。
HTML
<div class="row" ng-controller="MainController" ng-init="appInit()">
<dl id="sample" class="dropdown">
<dt ng-click="showDropdown=!showDropdown" ><a ng-class="myclass" href="javascript:void(0)"><span>{{selectedRole.UserRoleDesc}}</span></a></dt><!--ng-click="myclass=!myclass"-->
<dd>
<ul ng-click="showDropdown=!showDropdown" style="display:block" ng-show="showDropdown">
<li ng-repeat="user in loggedinUser" >
<a ng-click="selectRole(user)" href="javascript:void(0)">{{user.UserRoleDesc}}</a>
</li>
</ul>
</dd>
</dl>
</div>
由于