casbloem / vue-luxon

Easy use of datetime with Luxon in Vue
https://npmjs.com/package/vue-luxon
72 stars 8 forks source link

`:` in filter function names breaks usage in `v-bind` expressions #16

Closed riconnon closed 4 years ago

riconnon commented 4 years ago

Per the docs here https://vuejs.org/v2/guide/filters.html Vue filters should be usable in v-bind expressions like <component v-bind:name="value| luxon:locale('fulls')"> When I try to do this, however, I get the error:

   invalid expression: Unexpected token ':' in
     value | luxon:locale('fulls')

I suspect that the : in the filter names is breaking this. Perhaps you'd be willing to add an alias to these using a different naming scheme.

casbloem commented 4 years ago

Thank you for pointing this out. I've added aliases for the filters for now, and i'll make this the default format in the next version.

luxon:format => luxonFormat luxon:locale => luxonLocale