我正在尝试在加载视图时查看数据表click here。目前我收到错误消息Type error : Cannot read property 'childNodes' of undefined
,这是阻止我的服务数据加载。通常会导致此问题的原因以及如何解决?
<table class="sortable">
<thead>
<tr>
<th>Original Balance</th>
<th>Effective Date</th>
<th>Amount</th>
<th>Action</th>
<th>New Balance</th>
</tr>
</thead>
<tbody ng-repeat="user in days | filter:query | limitTo: 1">
<tr>
<td>{{user['orginal-balance']['30-sept-15']}}</td>
<td>{{user['effective-date']['30-sept-15']}}</td>
<td>{{user['amount']['30-sept-15']}}</td>
<td>{{user['action']['30-sept-15']}}</td>
<td>{{user['new balance']['30-sept-15']}}</td>
</tr>
</tbody>
</table>
服务
var promise = monthlyService.getmonths();
promise.then(function (data){
$scope.months = data.months;
});
控制器
.controller('policyCtrl', ['$scope', '$http', function($scope, $http) {
$(document).ready(function(){
$('.summary').matchHeight();
$('.statements').responsiveTabs({
startCollapsed: 'accordion'
});
$.ReStable({
rowHeaders: false,
maxWidth: 1024,
keepHtml: false
});
$(".sortable").DataTable({
"order": [[0, "desc"]]
});
if ($('.portal-body').children('.policy-block').length > 1) {
$(".policy-block").addClass("multiple");
}
});
}
TypeError: Cannot read property 'childNodes' of undefined