0

I have an application which relies on can.route to capture the #change when the user clicks on a link. href for the link is having pattern '#!'. Once the change is capture by the can route utility, i am seeing the hash in the browser changing to #!&.

This is causing an additional entry in browser history stack. Has anyone faced a similar issue?

Appreciate your help.

1 Answers1

0

Could not provide a fix as there is no code to see how the route is configured.
Looks like you are adding only additional parameters to the route. To confirm, pls execute can.route.attr(); in your developer console of the browser.

If everything is configured properly, you should get something like this for the url http://localhost/example#!currentRoutePage

---> can.route.attr(); Object {route: "currentRoutePage"}

Looks in your case, url is http://localhost/example#!&view=currentRoutePage and so route is null in the object

---> can.route.attr(); Object {view: "currentRoutePage", route: ""}

If this doesn't help much, please share the url you are seeing in the browser and the route configuration for the same.

Moove
  • 9
  • 3