我必須顯示兩種類型的gridOptions,而不使用兩個網格試圖更改gridOptions動態不工作(一次工作)。動態更改角度UI網格選項
工作示例http://plnkr.co/edit/4QKGIB?p=preview。
$scope.grid1=function(){
$scope.gridOptions = $scope.gridOptions1;
$scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.ALL);
}
$scope.grid2=function(){
$scope.gridOptions = $scope.gridOptions2;
$scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.ALL);
}
看到它是 –