cms/app-client/app/routes/application.js
changeset 74 2bd46d0b2c80
parent 42 7d091abf82fd
child 81 848e4a5ad4d9
equal deleted inserted replaced
73:79a23f4911f9 74:2bd46d0b2c80
     1 import Ember from 'ember';
     1 import Ember from 'ember';
     2 
     2 
     3 export default Ember.Route.extend({
     3 export default Ember.Route.extend({
     4   model() {
     4   model() {
     5     return this.store.findAll('sound');
     5     return this.store.findAll('sound');
       
     6   },
       
     7   actions: {
       
     8     willTransition: function(transition) {
       
     9       var _this = this;
       
    10       var queryParams = {};
       
    11       this.controller.get('queryParams').map(function(elt, index){
       
    12         queryParams[elt] = _this.controller.get(elt);
       
    13       });
       
    14       this.transitionTo({ queryParams: queryParams });
       
    15     }
     6   }
    16   }
     7 });
    17 });