In Ember with two query parameters, why does the second query parameter disappear when I manually set the other?

I have query parameters set on a route.

SomeController
  queryParams: ['foo', 'bar']

SomeRoute
  queryParams:
    foo:
      refreshModel: true
    bar:
     refreshModel: true

url initially looks like http://blahblah.com/some?foo=123&bar=456

but when I set the parameter on the controller, for example someController.set ('bar', 666), foo param disappears after the transition, http://blahblah.com/some?bar=666

How can I keep all request parameters intact when I change only one? I also tried controller.setProperties () to install them all at the same time, but with no luck.

+4
source share
1 answer

.

        var options = {};
        options['foo'] = 123;
        options['bar'] = 666;
        this.transitionToRoute(someRoute, {
            "queryParams": options
        });
-1

All Articles