In my project, I'm facing an error "the resource (ctrl.perfRes) has the property header or rows undefined ", the following is the primary code(not use $scope):
controller.js
function portalCtrl(){
var ctrl = this,
resData = [{name: 'David', street: '1234 Anywhere St.'}]
ctrl.perfRes = {
"header": [
{"bizModule": "Biz Module"},
{"high": "High"},
{"normal": "Normal"},
{"low": "Low"}
],
"rows": resData,
"sortBy": "bizModule",
"sortOrder": "asc"
}
}
<div ng-controller="portalCtr as ctrl">
<div tasty-table resource="ctrl.perfRes" class="table-responsive">
<table class="table">
<tbody>
<tr ng-repeat="row in rows">
<td>{{row.bizModule}}</td>
<td>{{row.high}}</td>
<td>{{row.normal}}</td>
<td>{{row.low}}</td>
</tr>
</tbody>
</table>
<div tasty-pagination></div>
</div>
</div>
AngularJS tastyTable directive: the resource (ctrl.perfRes) has the property header or rows undefined <div class="app-content-body fade-in-up ng-scope" ui-view="">
please help to check , thanks.