I'm currently working on a custom filter that transforms zero values into ' - ' for display purposes. The goal is to display currency formatting for non-zero values. However, I encountered an unexpected token error while trying to implement this filter.
angular.module('app')
.filter('displaynullcurrency', function(){
return function(input){
if(!input){ return ' - '; }
if(parseFloat(input) != 0){
return {{input | currency}};
}
return ' - ';
};
});