How to pass parameters between different routes (in Ember 2.x)?

After all, I found that query-params is well suitable. But, I need to override serializeQueryParam and deserializeQueryParam hooks to send complex objects.

No matter in arrays, if I define them as the following in my route:

  queryParams: {
    arr:{
      type:'array'
    }
  },

As a workaround, I can send all complex objects in an array as following:

this.transitionTo('my-route', {queryParams:{[myComplexObject]});

Or I can override serializeQueryParam and deserializeQueryParam hooks. See my question about overriding them.

1 Like