In one of my angular application I will get the values when I pass the key in ng-repeat.
Here each rows in rowsdata has values like 'my file1 data', 'my file2 data', 'my file3 data'
But I need to pass it as 'myfile1data', 'myfile2data', 'myfile3data'
When I used rows.replace(' ','') it is removing only the first space like 'myfile1 data', 'myfile2 data', 'myfile3 data'
<tr ng-repeat="data in datas">
<td ng-repeat="rows in rowdatas">{{data[rows.replace(' ','')]}}</td>
</tr>
EDIT
But when I use
<td ng-repeat="rows in rowdatas">{{data[rows.replace(/ /g,'')]}}</td>
I got
Error: a is not a function OPERATORS["/"]@http://loclhost/jcp_standardwork/secure/scripts/vendor/angular/angular.js:5959 OPERATORS["/"]@http://loclhost/jcp_standardwork/secure/scripts/vendor/angular/angular.js:5959 binaryFn/<@http://loclhost/jcp_standardwork/secure/scripts/vendor/angular/angular.js:6292
Can anyone show me some solution for this?