I am unable to find a solution to remove a substring in an angular expression while using the ng-repeat directive.
The controller is in an external javascript file, and html is as follows.
function myController($scope, $http){
$http.get('http://localhost:3000/people.json').
success(function(data){
$scope.persons = data;
});
}
<table ng-controller="myController" class="table table-striped table-hover">
<thead class="text-center">
<th>Name</th>
<th>ID</th>
<th>Address</th>
</thead>
<tbody>
<tr ng-repeat="person in persons" class="text-center">
<td>((person.name}}</td>
<td>{{person.id}}</td>
<td>{{person.address}}</td>
</tr>
</tbody>
</table>
The localhost:3000/people.json page has a couple hundred JSON objects:
[ { name: "John Smith", id: 12345, address: "addr:789 Broadway St" },
... ]
My Question: What is the most efficient and/or easiest method of stripping out the 'addr:' substring in the address value? I don't have write access to the people.json page.