How to use angular-translate with ng-table to translate column titles?
I am dynamically generating a table using ng-table in Angular 1.5.5, and I want to translate the column title $translatePartialLoader from angular-translate, how do I do this? The below, doesn't work and outputs the name of the translation string.
<div ng-controller="TableController as vm">
<table ng-table-dynamic="vm.tableParams with vm.columns" class="table" show-filter="true">
<tr ng-repeat="row in $data">
<td ng-repeat="col in $columns" data-title="{{col.title | translate}}">{{row[col.field]}}</td>
</tr>
</table>
</div>
Remove the curly brackets from the data-title attribute :
data-title="col.title | translate"
So If I simplify a bit and just have the following:
<td ng-repeat="col in $columns" data-title="A Title">{{row[col.field]}}</td
I am still not able to overwrite the current title for that column. Do I need to use a template?