I am using AngularJs, html to show table and display the records in the table.
Demo: http://plnkr.co/edit/xHRLAynOpUiLWbOKhqUm?p=preview&preview
I am trying to click on the number's hyperlink present in the second column. Currently I'm splitting the numbers using the comma (,) delimiter and used the <a href> link to pass the associated number I have clicked on (can see working on first row links).
Sometimes as the data is dynamic, I may get semicolon (;) or colon (:) as the separator, and then the code breaks, passing multiple associated numbers when clicked on the link.
<a ng-repeat="associateNum in player.associatedNumber .split(',')" href="https://urladdr/associateid={{associateNum}}" target="_blank">
       {{associateNum}}<span ng-if="$index+1 != player.associatedNumber.split(',').length">;</span></a>
How to support the above <a href> link even when the associated numbers in the same row are having , or ; or : as the separators?
js code:
app.controller('MainCtrl', function($scope) {
  $scope.players = [{
    "name": "Robert C",
    "associatedNumber": "21,10,133",
    "standing": true,
    "result":"Delivered,shipped,shipped"
}, {
    "name": "Joey C",
    "associatedNumber": "55,2:22;33",
    "standing": false,
    "result":"To be delivered,Delivered"
}, {
    "name": "Bobby A",
    "associatedNumber": "15;22:11",
    "standing": true,
    "result":"TO be delivered"
}, {
    "name": "John A",
    "associatedNumber": "1,33,34",
    "standing": true,
    "result":"To be delivered,shipped"
}];
});
 
     
     
    