Dev Overflow Dev Overflow - 1 year ago 304
Javascript Question

Filter currency not working after upgrade

I've just upgraded to vue.js version 2. However after upgrading to vue.js version 2 my currency filter isn't working anymore. it throws a error on console.

<span class="amount">{{ amount | currency '£' }</span>

Console erro

Failed to resolve filter: currency '£'

Answer Source

Built in Text filters has been removed in vue.js version-2.

Replacing the currency Filter

'£' + price.toFixed(2)


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download