Angularjs 在不同选项卡中显示不同的ui网格

Angularjs 在不同选项卡中显示不同的ui网格,angularjs,angular-ui-grid,Angularjs,Angular Ui Grid,“严格使用”; 角度.module('网格') .controller('gridCtrl'、['$scope'、'$log'、'$http'、'uiGridConstants',函数($scope、$log、$http、$uiGridConstants){ $scope.gridOptions={}; $scope.gridOptions.columnDefs=[ {name:'ID',displayname:'ID',enableCellEdit:true,headerCellClass:$

“严格使用”;
角度.module('网格')
.controller('gridCtrl'、['$scope'、'$log'、'$http'、'uiGridConstants',函数($scope、$log、$http、$uiGridConstants){
$scope.gridOptions={};
$scope.gridOptions.columnDefs=[
{name:'ID',displayname:'ID',enableCellEdit:true,headerCellClass:$scope.highlightFilteredHeader},
{name:'Store No',displayname:'Store Number',enableCellEdit:true,headerCellClass:$scope.highlightFilteredHeader},
{name:'Merch No',displayname:'Store Status',enableCellEdit:true,headerCellClass:$scope.highlightFilteredHeader}
];	
$http.get('modules/grid/InputData.json')
.成功(功能(数据){
$scope.gridOptions.data=数据;
}); 
}]);


基本上是不相关的,但说真的,那HTML是怎么回事?您的选项卡和大量内容嵌套在
中。跨距是内联元素,它们不能有块子元素!话虽如此,您确定您的
.get
呼叫成功了吗?您是否尝试添加一个失败处理程序以查看是否出了问题?当将其用作没有视图的静态代码时,它正在工作..get调用不返回任何内容..它正在显示数组[0],因此。。。这是你的问题。您的
get
呼叫失败。在返回网格失败的情况下,您需要定义一个错误处理程序,然后需要找出它无法获取其数据的原因。感谢冻结…我发现了错误。它来自我的.css文件