Hoping this would be something someone would have encountered, using the ng-grid component for displaying data.
One of the column is a phone number. Is there an easier way to format phone as (123)-123-1234.
The ng-grid code looks like this,
$scope.gridOptions = { data:'records',
enableRowSelection:false,
filterOptions: $scope.filterOptions,
columnDefs:[
{field:'phoneNumber', displayName:'Phone', width:80}
]};
Here is one solution that worked. the information "row.getProperty(col.field)|phoneNumber", "phoneNumber " is coming in the JSON string. The code in controller goes something like this for the column
In the html file the following code snippet.