javascript - AngularJs Datatables not able to iterate columns on html using ng-repeat -
hi working on angularjs datatables , trying iterate columns , rows using ng-repeat not working. checked document not able find exact way pass columns , 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 dtcolumns manually created , dtoptions directly assigned json, want assign columns json. , why can't use ng-repeat on html iterate both columns , rows rather <table datatable="" dt-options="showcase.dtoptions" dt-columns="showcase.dtcolumns" class="row-border hover">
thanks,
if want use angular way bind date table must this
<table datatable="ng" class="row-border hover"></table>
as per docs.
Comments
Post a Comment