Sha256: c69264e554bb9c4ebc25ccabb1058b709ba4347e42d0521cbdd9e94e2bcfa5f9
Contents?: true
Size: 800 Bytes
Versions: 10
Compression:
Stored size: 800 Bytes
Contents
# in template: # {{ [amount] | mnoCurrency : [currency] : ([true|false]) }} # or in js file: # $filter('mnoCurrency')(amount,currency,[true|false]) # angular.module('maestrano.filters.currency', []).filter('mnoCurrency', ["$filter", ($filter) -> (amount, currency, showName=true) -> if amount? s = $filter('currency')(amount) # official accounting notation: (15) > replaced by: -15 s = s.replace('(','-') s = s.replace(')','') if currency == "EUR" s = s.replace('$','') s = s.replace(',', ' ') s = s.replace('.', ',') return "#{s} €" else if currency != "AUD" && currency != "USD" s = s.replace('$','') if showName return "#{s} #{currency}" else return s else return "" ])
Version data entries
10 entries across 10 versions & 1 rubygems