I want to do a redirect that does a full page reload so that the cookies from my web server are refreshed when the page loads. window.location = "/#/Next"
and window.location.href = "/#/Next"
don't work, they do an Angular route which does not hit the server.
What is the correct way to make a full server request within an Angular controller?
For <a>
tags:
You need to stick target="_self"
on your <a>
tag
There are three cases where AngularJS will perform a full page reload:
<a href="/ext/link?a=b" target="_self">link</a>
<a href="http://angularjs.org/">link</a>
<a href="/not-my-base/link">link</a>
Using javascript:
The $location
service allows you to change only the URL; it does not allow you to reload the page. When you need to change the URL and reload the page or navigate to a different page, please use a lower level API: $window.location.href
.
See: