I am displaying data from a large json object and want to filter the value as a currency, but only if it exists. Otherwise I want to print out a dash. The problem I am having is that the currency filter will filter the dash into nothing. Is there a way to filter on the first part of a conditional but not the second?
Want to show either the dollar amount or a dash
{{obj.dollarAmount || '-'}}
Also want to filter the dollar amount as a currency (this obviously is invalid code)
{{obj.dollarAmount | currency || '-'}}
This is not what I want because it will display an empty string when it should be showing a dash. (because currency filter on a dash returns an empty string)
{{obj.dollarAmount || '-' | currency}}