角度 UI 选择不呈现输入字段

angular ui-select not rendering input field

本文关键字:输入 字段 UI 选择 角度      更新时间:2023-09-26

嘿伙计们,我介意,

我有一个 Angular 1.4.7 项目,想使用"ui.select",但我总是收到此错误:

Error: [$compile:tpload] http://errors.angularjs.org/1.4.7/$compile/tpload?p0=bootstrap%2Fmatch-multiple.tpl.html&p1=404&p2=Not%20Found
Error: [$compile:tpload] http://errors.angularjs.org/1.4.7/$compile/tpload?p0=bootstrap%2Fchoices.tpl.html&p1=404&p2=Not%20Found
Error: [$compile:tpload] http://errors.angularjs.org/1.4.7/$compile/tpload?p0=bootstrap%2Fselect-multiple.tpl.html&p1=404&p2=Not%20Found

我已经测试了所有内容:(

在这里,他们谈论的是问题,但没有解决方案:Github问题#992

我的索引.html js 部分(css 包含在头部):

<!-- BEGIN CORE ANGULARJS PLUGINS -->
    <script src="plugins/angularjs/angular.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-sanitize.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-touch.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-translate.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/angular-translate-loader-static-files.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-cookies.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/angular-ui-router.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ocLazyLoad.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ui-bootstrap-tpls.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ng-country-select.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ui-select/select.js" type="text/javascript"></script>
    <!-- END CORE ANGULARJS PLUGINS -->
    <!-- BEGIN JS PLUGINS -->
    <script id="ng_load_scripts_after"></script>
    <!-- END JS PLUGINS -->
    <!-- BEGIN APP LEVEL ANGULARJS SCRIPTS -->
    <script src="js/main.js" type="text/javascript"></script>
    <script src="js/directives.js" type="text/javascript"></script>
    <script src="js/filters.js" type="text/javascript"></script>
    <script src="js/services/AlertService.js" type="text/javascript"></script>
    <script src="js/services/ToastrService.js" type="text/javascript"></script>
    <script src="js/services/RequestService.js" type="text/javascript"></script>
    <!-- END APP LEVEL ANGULARJS SCRIPTS -->

我的指令调用:

<ui-select multiple ng-model="vm.legalbranches">
      <ui-select-match placeholder="Select legalbranch...">{{$item.label}}</ui-select-match>
      <ui-select-choices repeat="legalbranch in legalbranches | filter: {label: $select.search} track by legalbranch.id">
               <span ng-bind="legalbranch.label"></span>
                <!--{{legalbranch.label}}-->
      </ui-select-choices>
</ui-select>

vm.legalbranch 和 legalbranch 通过解析在控制器中设置。合法分支是一个对象的数组。

我在 0.14.8 版中使用 ui-select 和0.14.0 版中的 angular-ui-bootstrap和角度在 1.4.7

黑客是问题所在???

编辑:这是加载站点后 dom 中的结果:

<ui-select multiple="" ng-model="vm.legalbranches" class="ng-pristine ng-untouched ng-valid ng-scope"></ui-select>

我正在使用 Oclazyload,我做了以下操作来运行 UI 选择:

                    {
                        name: 'ui.select',
                        insertBefore: '#ng_load_plugins_before', // load the above css files before '#ng_load_plugins_before'
                        files: [
                            'plugins/angularjs/plugins/ui-select/select.min.css',
                            'plugins/angularjs/plugins/ui-select/select.js' //use the non minify because we have custom edits in it
                        ]
                    },

我在名称字段中使用了我的应用程序名称,但我必须使用 UI.select

感谢帮助