I have a JSON array
in my CI
view like
<?php $columns = [".","Product Name","Subtracking","Sale Amount","Merchant Sale Amount","AN","Advertiser Name"," Date "]?>
I want to set these as my ng-grid
header
I have tried the following but did not work for me
$scope.gridOptions = {
data: 'myData',
columnDefs: <?php echo $columns?>
};
.js
filesJS
in my php file, and its working if i doconsole.log(<?php echo $column?>)