如何将angular度uiselect结果绑定到ui-grid / ng-grid

我想绑定一个UIselect结果到一个UI网格…

$scope.gridOptions = { enableSorting: true, showFooter: true, columnDefs: [ { field: 'name', name: 'Name' }, ], data: 'multipleDemo.selected', onRegisterApi: function( gridApi ) { $scope.gridApi = gridApi; } }; $scope.selectItem = function (item, model) { $scope.gridApi.core.notifyDataChange( $scope.gridApi.grid, uiGridConstants.dataChange.EDIT ); }; 

我的玉模板是这样的:

 ui-select(theme='bootstrap', multiple='', ng-model='multipleDemo.selected', ng-disabled='disabled', close-on-select='false', on-select='selectItem()') ui-select-match(placeholder='select something...') {{$item.name}} ui-select-choices(repeat='f in data | filter: $select.search') div(ng-bind-html='f.name | highlight: $select.search') #grid.grid(ui-grid="gridOptions") 

编辑

我解决了这个问题。 (我的控制器只是围绕网格,而不是围绕select…)

你介意张贴一个笨重的人还是小心你的代码? 很难看到它,我正在处理类似的事情。 干杯!

编辑:看看StackOverflow'ers,OP谁回答自己的问题与工作的解决scheme。 一个真正罕见和雄伟的野兽见证。 从他的评论: http : //embed.plnkr.co/d37YrfRjE7YZPgwCncBE/preview