'use strict';
angular.module('Grid')
.controller('gridCtrl', ['$scope', '$log', '$http', 'uiGridConstants', function ($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')
.success(function(data) {
$scope.gridOptions.data = data;
});
}]);
<!-- <div ng-include src="''"></div> -->
<ng-include src="'modules/layout/header.html'"></ng-include>
<div>
<div id="RghtsectnDiv">
<div id="ShowCont_Area">
<div><span>
<uib-tabset>
<uib-tab heading="Input">
<div>
<div id="grid1" ui-grid="gridOptions" class="grid"></div>
</div>
</uib-tab>
<uib-tab heading="Output">
<div>
<div id="grid1" ui-grid="gridOptions" class="grid"></div>
</div>
</uib-tab>
</uib-tabset>
</span></div>
</div>
</div>
<div class="clearfix"></div>
</div>
我为html调用了网格,因为我在html(uib-tab标题)中给出的标题显示为选项卡,但是不显示选项卡内的网格。 在输出中,它将进入网格视图,仅显示选项卡标题。 检查代码段