简体   繁体   English

角选择框未显示在Mozilla,Internet Explorer(引导选择)中

[英]angular select box not displaying in mozilla, Internet explorer (bootstrap-select)

I have the following select box appearing in chrome but not in other browsers Using bootstrap-select (1.12.2 V) to style the select box. 我在chrome中出现了以下选择框,但在其他浏览器中却没有,使用bootstrap-select(1.12.2 V)设置选择框的样式。

options.html options.html

<select ng-model="ctrl.qSettings.env" 
        ng-change="ctrl.envChanged()"
        class="selectpicker"
        data-width="fit">
<option style="color: #5cb85c;" 
        ng-repeat="env in ctrl.qSettings.envs">{{env}}
</option>
</select>

html html

<!DOCTYPE html>
<html lang="en" ng-app="app">

  <head>
     <link rel="stylesheet 
     href="node_modules/bootstrap/dist/css/bootstrap.min.css">
     <-- bootstrap select -->
     <link rel="stylesheet" 
     href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap 
     select/1.12.2/css/bootstrap-select.min.css">  
     <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-
     select/1.12.2/js/bootstrap-select.min.js"></script>
 </head>
 <body ng-controller="abcCtrl as ctrl">

   <div ng-include="'templates/options.html'"></div>

   <script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
   <-- ui select -->
   <script src="node_modules/ui-select/dist/select.min.js"></script>
   <link rel="stylesheet" href="node_modules/ui-select/dist/select.min.css">
 </body>
</html>

Can you please guide me on what would be wrong here,Thanks. 谢谢您能指导我解决这里的问题。

Try ng-options. 尝试ng-options。

<select ng-model="ctrl.qSettings.env" 
        ng-change="ctrl.envChanged()"
        class="selectpicker"
        data-width="fit"
    ng-options="env in ctrl.qSettings.envs">

</select>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM