nuxt-community / moment-module

Efficient Moment.js integration for Nuxt
MIT License
195 stars 12 forks source link

Using $moment inside templates is NOT reactive #52

Closed outlier89 closed 4 years ago

outlier89 commented 4 years ago

Hi. I am using Nuxt v2.12.0 and @nuxtjs/moment in buildmodules.

Problem:

{{$moment(1578147479000).fromNow()}}
is not reactive. Page has to be refershed everytime to get the correct time duration.

As per docs: Using inside templates Instead of a filter, you can easily use $moment service from templates (and yes, it is reactive!).

{{ $moment(...) }}
ricardogobbosouza commented 4 years ago

Hi @outlier89 Docs updated https://github.com/nuxt-community/moment-module#using-inside-templates

Dryymoon commented 3 years ago

I have this problem too "nuxt": "2.14.6", "@nuxtjs/moment": "1.6.1",

{{ $moment().fromNow() }} Isn`t reactive.

How to solve this?