When transitioning using routerService.transitionTo("/home?a=b")
, or via <LinkTo
, Ember seems to strip out any query parameters which are not configured in the destination route/controller.
This makes sense if Ember is the only thing consuming the query parameters.
However, we have a number of situations where we want to preserve all query parameters. For example: we want to be able to add a link with an analytics parameter like /home?utm_campaign=foo
, and have that parameter preserved when transitioning to the route. We don’t necessarily have a list of all the possible query parameters in advance, so ideally we would allow everything.
I can’t find anything in the documentation about this. Does anyone know of any solutions or safe(-ish) workarounds? As it stands, it seems like we’d be stuck overriding internal methods on the router… which obviously isn’t ideal