Propagate the current query param to the new route (necessary when the route change comes from outside the app)
--- a/cms/app-client/app/routes/application.js Thu Dec 17 13:11:40 2015 +0100
+++ b/cms/app-client/app/routes/application.js Fri Dec 18 15:19:19 2015 +0100
@@ -3,5 +3,15 @@
export default Ember.Route.extend({
model() {
return this.store.findAll('sound');
+ },
+ actions: {
+ willTransition: function(transition) {
+ var _this = this;
+ var queryParams = {};
+ this.controller.get('queryParams').map(function(elt, index){
+ queryParams[elt] = _this.controller.get(elt);
+ });
+ this.transitionTo({ queryParams: queryParams });
+ }
}
});