jgwhite / ember-time

Example of periodically updating view in Ember
http://jgwhite.co.uk/ember-time
22 stars 6 forks source link

Change output on tick, not bound value #2

Closed santtu closed 10 years ago

santtu commented 10 years ago

If this is used like {{fromNow valueBinding="createdAt"}} as in the example this will cause the original createdAt to be changed (two-directional binding) because of notifyPropertChange('value').

More info on http://santtu.iki.fi/2013/12/11/gotcha-beware-of-bidir-traffic/.

jgwhite commented 10 years ago

This whole example is kinda out of date now. And actually, the pattern of having a clock service is kinda preferable. Still, good call, thanks for the PR!

santtu commented 10 years ago

Do you mean the cookbook recipe http://emberjs.com/guides/cookbook/working_with_objects/continuous_redrawing_of_views/?

jgwhite commented 10 years ago

@santtu yeah exactly