嘿,伙计们,我很介意,
我有一个 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 Issue #992
我的 index.html js 部分(css 包含在 head 中):
<!-- 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.legalbranches 和 legalbranches 通过解析在控制器中设置。Legalbranches 是一个对象数组。
我在 0.14.8 版本中使用 ui-select,在 0.14.0 版本中使用 angular-ui-bootstrap,在 1.4.7 中使用 angular
问题出在哪里???
编辑:这是加载站点后 dom 中的结果:
<ui-select multiple="" ng-model="vm.legalbranches" class="ng-pristine ng-untouched ng-valid ng-scope"></ui-select>