emberjs / emberjs/ember.js

Modifying controller in willTransition if affecting the queryParams of "to" route.

Open
#18,747 0 comments 0 reactions 0 assignees View on GitHub
Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

I have transition from route-a to route-b.

the route-a has a query param objectType.

in willTransition hook of route-a I am resetting the objectType query param to null.

Below is the willTransition hook of route-a
![image](https://user-images.githubusercontent.com/20237860/74905789-24471880-53d5-11ea-857f-587c5bf77335.png)

When I am passing the queryParams to the route-b from route-a.

Below is the transition code from a component on route-a
![image](https://user-images.githubusercontent.com/20237860/74905860-5a849800-53d5-11ea-8ee6-1c38387020b5.png)

controller of route-b.
![image](https://user-images.githubusercontent.com/20237860/74905821-3923ac00-53d5-11ea-90d0-a6bc92ca8098.png)

**the resulting transition to route-b has no visible queryParam in the url**

This is resulting in route url "/route-b" instead of "/route-b?liveReload=aslkdas"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.