AHMAD
AHMAD

Reputation: 95

ng-grid Pass arabic header

I have ng-grid and want bind it with this Object in Javascript:

 $scope.myData = [{ يوم: "Moroni", age: 50 },
              { يوم: "Tiancum", age: 43 },
              ];

$scope.gridOptions = { data: 'myData' };

the html is:

<div class="gridStyle" ng-grid="gridOptions"></div>

when i see the grid it look like

enter image description here

and no value come in column 'يوم', but if the column is in english its return result.

Any solution for the problem please

Upvotes: 2

Views: 154

Answers (1)

Manube
Manube

Reputation: 5242

If you don't mind keeping latin alphabet for variable names, there is a workaround.

You need to add the following to $scope.gridOptions:

columnDefs: [
        {field:"name",displayName:"يوم"},
        { field: 'age', displayName: 'age' }
      ]

Please find workaround plunker

Upvotes: 1

Related Questions