1

JS BIN - http://emberjs.jsbin.com/halacihuye/2/

I have a sample jsbin above with a single route "conversation/:id". I want to run some jquery each time the view has rendered the new model but using the "didInsertElement" and "afterRenderEvent" hook only runs my code on the first transition.

I read about the same issue here https://github.com/emberjs/ember.js/issues/3454 but wasn't able to find a solid solution.

Below is the code I hope to run each time

App.ConversationView = Ember.View.extend({
  afterRenderEvent: function() {
    alert('this should run on each transition');
  }
});

Is there a completely different approach that I need to take? Or perhaps a minor tweak?

user1465506
  • 111
  • 2
  • 10

0 Answers0