Periodically update Polymer Binding

80 views Asked by At

I have a polymer data binding that uses a filter to change a date time into "x minutes ago", or "4 days ago".

The only problem with this approach is that the data can become stale if the user does not reload the screen.

Is there any way that I can force the binding to reevaluate, even though the bound property has not changed?

I can manually do it by increment the tick on the time stamp, but that's just wrong! I can also do it by setting it to something else, then reverting to the correct value. Even worse!

Original binding:

{{ comment.createdOn | toLocalFormat('fromNow')}}

The toLocalFormat filter simply converts the time into '5 minutes ago', 'yesterday' etc.

Any suggestions?

0

There are 0 answers