#90 Observers Run Once

If you have an observer like this:

Then in your code, you write:

Your fullName observer will fire twice because both dependent properties changed.  You can work around this by using Ember.run.once:

This will ensure that any processing you need to do only happens once, and happens in the next run loop once all bindings are synchronized.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu