AngularJS ng-dialog 不适用于 Select2
AngularJS ng-dialog not working with Select2
我有 Angular 对话框,我使用 Select2 作为下拉菜单的插件。现在,select2 插件在某些页面上运行良好,但在我使用 ng-dialog 时却不行。
$('.select2').select2();
<select class="js-example-basic-single form-control">
<option></option>
<option>Canada</option>
<option>Mexico</option>
<option>United States</option>
</select>
笨蛋:http://plnkr.co/edit/XLdB6RKwAWlPkj7MGH6M?p=preview
如有任何帮助,我们将不胜感激。谢谢!
更好的方法是通过 select2 的 angular 指令。已被 https://github.com/angular-ui/ui-select 取代。使用指令 angular 应该会减少问题。
问题是 select2 中的 span 字段没有出现,因为 "z-index" 属性 在 ngDialog css 文件中,位于 .ngdialog class。您只需调整他的级别即可使 select2 正常工作。
我有 Angular 对话框,我使用 Select2 作为下拉菜单的插件。现在,select2 插件在某些页面上运行良好,但在我使用 ng-dialog 时却不行。
$('.select2').select2();
<select class="js-example-basic-single form-control">
<option></option>
<option>Canada</option>
<option>Mexico</option>
<option>United States</option>
</select>
笨蛋:http://plnkr.co/edit/XLdB6RKwAWlPkj7MGH6M?p=preview
如有任何帮助,我们将不胜感激。谢谢!
更好的方法是通过 select2 的 angular 指令。已被 https://github.com/angular-ui/ui-select 取代。使用指令 angular 应该会减少问题。
问题是 select2 中的 span 字段没有出现,因为 "z-index" 属性 在 ngDialog css 文件中,位于 .ngdialog class。您只需调整他的级别即可使 select2 正常工作。