I have used the .00 currency filter from: AngularJS currency filter: can I remove the .00 if there are no cents in the amount?
However, how can i adapt the filter to split the value by comma's?
For example,
Instead of £456789 It should show: £456,789
Here's a plunker i made: http://plnkr.co/edit/uDFWkPAmc7PrgDwHPDho?p=preview
Filter:
app.filter('myCurrency', ['$filter', function ($filter) {
return function(input) {
input = parseFloat(input);
if(input % 1 === 0) {
input = input.toFixed(0);
}
return '£' + input;
};
}]);