我從後端獲取客戶列表。我想從它進入ng-repeat。如果我們有更多的客戶,垂直滾動應該是可見的,但它不可見,爲什麼它是不可見的。垂直滾動在角度視圖中不可見ng-repeat
<link rel="stylesheet" href="hike.css">
<div ng-show='isLoading' class="row">
<div class="col-mg-12 hike-container">
<div class="panel-body">
<div class="table-responsive">
<table class="hike table table-hover tab-panel tab-content">
<thead>
<tr>
<th>
<span>Customer Id</span>
</th>
<th>
<span>Email</span>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="customer in customers" ng-class-odd="'odd'" ng-class-even="'even'">
<td>{{customer.id}}</td>
<td>{{customer.email}}</td>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
hike.css
div.lhike-container .lhike{
background-color: white;
padding: 0px 0px;
border-style: solid;
border-width: 1px 1px 1px 1px;
border-color: #dde6e9;
}
th {
background: rgba(102, 123, 147, 0.14);
text-align: center;
}
tbody > tr.odd{
background: #FAFBFC;
}
tbody > tr > td {
text-align: center;
height: 52px;
vertical-align: middle;
}
控制器
(function(){
'use strict';
angular
.module('app')
.controller('CustController', CustController);
CustController.$inject = ['$scope', 'customerService'];
function CustController($scope, customerService,){
$scope.isLoading = false;
customerService.getCustomers.then(function(response){
if(response.data.error === 0){
if(response.data.result.customers){
$scope.customers = response.data.result.customers;
}
}
$scope.isLoading = true;
});
}
})();
你可以添加控制器代碼以及 – Srijith
@Srijith添加控制器... – Guest