JS BIN - http://ift.tt/1roUTdB
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 http://ift.tt/1BcKn97 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?
Aucun commentaire:
Enregistrer un commentaire