<ui-select>
标签没有返回任何值,它仅显示{{$select.placeholder}}
。当我将我的一些库(例如angularjs 1.3)升级到1.6.5并将ui-bootstrap升级到更高版本时,我遇到了它。
<ui-select autofocus id="tempList" ng-model="uiSelectedTemplate.selected"
ng-change="selectedTemplate(uiSelectedTemplate.selected)"
ng-disabled="loadingTemplates" ng-click="checkIfReindexing()">
<ui-select-match placeholder="Select a document">
{{uiSelectedTemplate.selected.Name}}
</ui-select-match>
<ui-select-choices repeat="uiSelectedTemplate in templateLists | filter: $select.search">
<span ng-bind-html="uiSelectedTemplate.Name | highlight: $select.search">
</span>
</ui-select-choices>
</ui-select>
这是控制台上的错误-
angular.js:14642 TypeError:string.replace不是函数
at Function.camelCase (jquery-3.0.0.js:346) at Function.jQuery.data (jquery-migrate-3.0.0.js:306) at replaceWith (angular.js:10494) at angular.js:10238 at processQueue (angular.js:17000) at angular.js:17044 at Scope.$digest (angular.js:18182) at Scope.$apply (angular.js:18480) at done (angular.js:12501) at completeRequest (angular.js:12727)