I am implementing angular datatable in my angularjs based application, i am doing rest service call and getting list of objects as a response to angularjs controller like
roomCategories.fetch({}, function(list){
$scope.categories = list.list;
});
In this scope i'll get the list of object, i need to set the scope var in angular datatable. But when i try to implement as
$scope.dtOptions = DTOptionsBuilder.fromFnPromise($scope.categories)
.withPaginationType('full_numbers');
$scope.dtColumnDefs = [
DTColumnDefBuilder.newColumnDef(0).withTitle('Name'),
DTColumnDefBuilder.newColumnDef(1).withTitle('Description')
];
I have seen the example like json or array implementation is explained, but i need to add or set the scope var i.e., list in the datatable.
in my html code
<table datatable dt-options="dtOptions" dt-column-defs="dtColumnDefs"></table>
But data is not reflected in page, can anyone help me to solve this issue.