当我点击启用弹出窗口的按钮时,它可以正常工作,但当我点击另一个按钮显示另一个帐户的弹出菜单时,第一个菜单不会消失,我不知道我是什么需要添加到我的代码才能实现这一点。
<td ng-class="bsPolicy.adjustBodyCell(grouplvl, '5', 'attach')" class="popover-row"
ng-if="dirvm.tabs[0].isActive">
<button class="vismaicon vismaicon-attach"
uib-popover-template="bsPolicy.dirvmConstant.AppendicesOfGroupPopoverTemplate"
popover-enable="false"
popover-trigger="outsideClick" ng-click="dirvm.setCollapsedSubAppendices($event)" popover-placement="auto bottom"
ng-if="grouplvl.accountRows.length > 0" ng-class="grouplvl.subAppendices.length > 0 ? '': 'disabled'"></button>
答案 0 :(得分:1)
popover-trigger 属性值需要用单引号括起来(从AngularUI-Bootstrap 2.0.0版开始)。
<td ng-class="bsPolicy.adjustBodyCell(grouplvl, '5', 'attach')" class="popover-row" ng-if="dirvm.tabs[0].isActive">
<button class="vismaicon vismaicon-attach"
uib-popover-template="bsPolicy.dirvmConstant.AppendicesOfGroupPopoverTemplate"
popover-enable="false"
popover-trigger="'outsideClick'" ng-click="dirvm.setCollapsedSubAppendices($event)" popover-placement="auto bottom"
ng-if="grouplvl.accountRows.length > 0"
ng-class="grouplvl.subAppendices.length > 0 ? '': 'disabled'"></button>
链接到文档:https://github.com/angular-ui/bootstrap/tree/master/src/popover