angularjs – Angular ui-select不包含在包含在角ui-bootstrap模
发布时间:2020-12-17 09:41:49 所属栏目:安全 来源:网络整理
导读:我正在面对 anular-ui-bootstrap modal指令的问题. 在我的应用程序中使用角度的 ui-select组件作为html选择的替代.这个ui-select在任何被包含的页面中都可以正常工作. 但是当我试图将它包含在一个模态弹出窗口中(使用ui-bootstrap $modal服务)时,下拉列表不
我正在面对
anular-ui-bootstrap modal指令的问题.
在我的应用程序中使用角度的 ui-select组件作为html选择的替代.这个ui-select在任何被包含的页面中都可以正常工作. 但是当我试图将它包含在一个模态弹出窗口中(使用ui-bootstrap $modal服务)时,下拉列表不显示选项 问题是here转载 angular.module('ui.bootstrap.demo').controller('ModalInstanceCtrl',function ($scope,$modalInstance,items) { $scope.addresses = [{ "id":1,"name": "chennai" },{ "id":2,"name": "banglore" },{ "id":3,"name": "madurai" }]; }); <div class="modal-body"> City <ui-select ng-model="selAddress"> <ui-select-match placeholder="Choose an address">{{$select.selected.name}}</ui-select-match> <ui-select-choices repeat="address in addresses track by $index" refresh-delay="0"> <div ng-bind-html="address.a | highlight: $select.search"></div> </ui-select-choices> </ui-select> Selected: <b>{{ selAddress }}</b> </div> 任何帮助将不胜感激.
我用ngDialog碰到这个(或类似的东西).我通过添加如下所示的ng-hide属性来修复我的问题:
<ui-select-choices repeat="..." ng-hide="!$select.open"> 这解决了在对话框内部由于某种原因而由组件给出了选择选项的ng-hide空属性的问题.希望这可以帮助你解决这个问题. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容