我面临 Angular UISelect 的问题,并使用 uiselect 选项将数据绑定到它并重复。
<ui-select class="form-control" ng-model="contractsHeader.AgencyName" theme="select2" ng-disabled="disabled" style="min-width: 300px;">
<ui-select-match placeholder="Select an agency">{{$select.selected.Name}}</ui-select-match>
<ui-select-choices repeat="agency in agencies ">
<div ng-bind-html="agency.Name"></div>
</ui-select-choices>
</ui-select>
我在chrome 控制台中看到以下问题
TypeError: undefined is not a function at link ( http://cdnjs.cloudflare.com/ajax/libs/angular-ui-select/0.8.3/select.js:924:11 ) 在 nodeLinkFn ( http://ajax .googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:6579:13)在compositeLinkFn(http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js: 5986:15)在nodeLinkFn(http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:6573:24)在compositeLinkFn(http://ajax.googleapis.com/ajax/ libs/angularjs/1.2.16/angular.js:5986:15 ) 在 publicLinkFn ( http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:5891:30 ) 在 boundTranscludeFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:6005:21)在控制器BoundTransclude (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16 /angular.js:6600:18 )在 Object.$watchCollectionAction [as fn] ( http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:20084:15 ) 处http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:12128:13)
IE 控制台我为每个记录绑定看到这个
类型错误: 在nodeLinkFn ( http : //ajax.googleapis . com/ajax/libs/angularjs/1.2.16/angular.js:6579:13)在compositeLinkFn(http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:5986:15)在nodeLinkFn(http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:6573:24)在compositeLinkFn(http://ajax.googleapis.com/ajax/libs/angularjs /1.2.16/angular.js:5986:15 ) 在 publicLinkFn ( http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:5891:30 ) 在 boundTranscludeFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:6005:9)在控制器BoundTransclude (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16 /angular.js:6600:11)在 $watchCollectionAction(http ://ajax. googleapis.com/ajax/libs/angularjs/1.2.16/angular.js:12128:13)
当我下拉它时,我看不到任何下拉值,但我看到行是绑定的,因为当我选择一个值时,它显示为选中。
奇怪的是当我在我的示例应用程序中使用相同的代码时,它就像一个魅力