Closed scottmcpherson closed 10 years ago
Hi Scott,
There are a few things going on here:
Hey Tom, I should have some time tomorrow to throw together a simple reproduction of this. I'll cc you once I get it uploaded to GitHub. And I'll get a separate ticket made for the last question.
I have a route that is called with
Router.go()
on a click event:I then set session variable to handle conditionally rendering a form:
and I'm setting the Session to false when the user navigates away from that route:
The first time I call
Router.go()
, the Session variable is correctly set and the form renders as expected. And when I hit the back arrow key, the form disappears and the Session is set to false as expected. But when I hit the browser forward arrow key, the Session does not get correctly set back to true and the form does not render.Another thing that I noticed: when I call
Router.go()
for the same route multiple times with the same exact parameters, the routes seemed to be getting pushed even though it's already on that identical route. In other words, if I click on the button three times—the one that's responsible for calling the form rendering route, I have to click on the browser's back arrow key three times to get back to the previous route.Also, the above scenario happens with the following route parameter structure:
Originally, however, I was trying to call the route with a sandwiched optional parameter
Any time the browser was refreshed, and the button was clicked again, it would add an additional
create
to the end of the url:http://localhost:3000/projects/KnmcJY6jdZgyBzKX2/activity/create/create
Is it required to put optional parameters at the end of the path?