recomputepublic
On a class-based helper, it may be useful to force a recomputation of that helpers value. This is akin to rerender
on a component.
For example, this component will rerender when the currentUser
on a session service changes:
// app/helpers/current-user-email.js export default Ember.Helper.extend({ session: Ember.inject.service(), onNewUser: Ember.observer('session.currentUser', function() { this.recompute(); }), compute() { return this.get('session.currentUser.email'); } });
Please login to continue.