Using ng-repeat am showing array of values which am getting it from backend. But i want to split the specific values using comma seperated and displya it dynamically.
Please find the HTML code below.
<li ng-repeat="history in claimGroupingHistories">
<div class="row">
<div class="col-lg-4 col-md col-sm-4 col-xs-4">
<label>{{'claimgroup.history.oldvalueselected'|translate}}:</label>
</div>
<div id="historyOldValueSelected_{{$index}}" class="col-lg-8 col-md-8 col-sm-8 col-xs-8">{{history.oldValueSelected}}</div>
</div>
</div>
</li>
Here, in the {{history.oldValueSelected}} values will be like ABC1234, XYZ2345, IJK098. Instead of showing the value in single line. I want to split the value using comma seperated and display the value.
For Example :
Now, it showing like,
Old Value Selected : ABC1234, XYZ2345, IJK098
Expecting output like,
Old Value Selected : ABC1234
XYZ2345
IJK098
Splitting the array values dynamically using comma seperated.
Testdata :
[
{
"id":null,
"dealerCode":"T030",
"oldValueSelected":null,
"newValueSelected":"Group by minimum claims, Customer Invoice or Repair Date",
"createdBy":"System Admin",
"createdAt":"2019-01-23T06:13:00.000Z",
"lastModifiedAt":"2019-01-22T18:42:59.000Z"
},
{
"id":null,
"dealerCode":"T030",
"oldValueSelected":"Group by minimum claims, Customer Invoice or Repair Date",
"newValueSelected":"Group by minimum claims",
"createdBy":"System Admin",
"createdAt":"2019-01-23T06:13:00.000Z",
"lastModifiedAt":"2019-01-23T06:13:07.000Z"
},
{
"id":null,
"dealerCode":"T030",
"oldValueSelected":"Group by minimum claims",
"newValueSelected":"Group by minimum claims, Customer Invoice No",
"createdBy":"System Admin",
"createdAt":"2019-01-23T06:13:00.000Z",
"lastModifiedAt":"2019-01-23T06:14:54.000Z"
},
{
"id":null,
"dealerCode":"T030",
"oldValueSelected":"Group by minimum claims, Customer Invoice No",
"newValueSelected":null,
"createdBy":"System Admin",
"createdAt":"2019-01-23T06:13:00.000Z",
"lastModifiedAt":"2019-01-24T06:23:33.000Z"
},
{
"id":null,
"dealerCode":"T030",
"oldValueSelected":null,
"newValueSelected":"Customer Invoice No, Group by minimum claims",
"createdBy":"System Admin",
"createdAt":"2019-01-23T06:13:00.000Z",
"lastModifiedAt":"2019-01-24T06:23:58.000Z"
}
]