angular.js csv number filter
علی ذوالفقار
1399/06/22 15:39:25 (874)
// use like this :
{{myvar | commafy}}
app.filter('commafy',function(){
return function(input){
try {
return input.toString().replace(/B(?=(d{3})+(?!d))/g, ",");
} catch (ex) {
return input;
}
};
});