I have routeone that needs a resolveserver side resource. This resource is requesting authentication. Therefore, I am showing a popup window of the login form that can be undone. When a route / permit is canceled, it receives rejectedand $routeChangeErrorworks correctly.
The problem is that I now have a failed location / url in the address bar and an unnecessary history entry.
How to replace current location url with last without reboot? And how to delete the current history record after changing the route?
Edit: I am using angular -http-auth. Here is my routing:
/home> /item(you must enable the resource that requires authentication, when it is not registered in the login form, a pop-up window opens, which is canceled)
When I cancel authentication, $ routeChangeError is fired, and I'm still on the /home
page due to /itemnever being displayed. Now the address bar shows the wrong URL:/item
source
share