How to reload models and also reset query params on leaving page?


How do you reload your models while also resetting query parameters when leaving the current page?

For example, I have:

  resetController: function(controller, isExiting, transition) {
    if (isExiting) {
      controller.set('user_stats_date', null);

  actions: {
    submitAction: function() {
      console.log('Reloading models');


The resetController will erase the controller values so they don’t persist after leaving the page. submitAction relies on calling refresh() to reload the models on my page.

However, refresh will also call the resetController which causes my values to get wiped. What is a good way to accomplish both of these functions.