Force To Refresh Ember View
i have an ember view with a bunch of jquery code to manipulate the dom, the thing is when i use: this.transitionTo('forecast.workpage', id); it only loads the view once but when i
Solution 1:
To re-render the whole route (page), you can use the route's refresh method. Or, as a possible solution to this.rerender()
failing, you could call that after it renders the first time.
didInsertElement: function() {
Ember.run.scheduleOnce('afterRender', this, function() {
this.rerender();
});
}
Personally, I wouldn't recommend either one. Your view should update automatically when the data it depends on changes. It if it's not updating, you probably have your observers set up wrong. (I don't really know your use case though, so use your best judgement.)
Post a Comment for "Force To Refresh Ember View"