Hi I am working on Angularjs Datatables and trying to iterate the columns and rows using ng-repeat but its not working. I checked the document but not able to find the exact way to pass columns and records on html.
function CustomElementCtrl(DTOptionsBuilder, DTColumnBuilder) {
var vm = this;
vm.dtOptions = DTOptionsBuilder.fromSource('data.json')
.withDOM('<"custom-element">pitrfl');
vm.dtColumns = [
DTColumnBuilder.newColumn('id').withTitle('ID'),
DTColumnBuilder.newColumn('firstName').withTitle('First name'),
DTColumnBuilder.newColumn('lastName').withTitle('Last name').notVisible()
];
}
Here the dtColumns are manually created and the dtOptions are directly assigned from json, but I want to assign columns also from json.
And why I can't use ng-repeat on html to iterate both columns and rows
rather then like this <table datatable="" dt-options="showCase.dtOptions" dt-columns="showCase.dtColumns" class="row-border hover">
Thanks,