I've used angular filters to do all kinds of fun formatting, but always on primitive values. For example, filtering numbers into a currency format.
How would I do that same kind of filtering for an array of values? For example
price = 1
prices = [1,2,3]
Assuming currency is the currency filter mentioned in https://docs.angularjs.org/api/ng/filter/currency
{{price | currency}}
would return $1.00
I would like
{{prices | currency}}
to return [$1.00,$2.00,$3.00]
how can i write a filter that does that? Or is there a different tool i should be using?
For more background...I'm using this array inside of the angular-selectize plugin. I don't have the option of using ng-repeat on my values.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…