$ location replace do not delete entries from browser history

Any idea why not:

$location.url(redirectURL,true);

~ OR ~

$location.path(redirectURL).replace(true);

Do not replace navigation history items? Or didn’t I understand what the replacement should do?

Thanks.

+4
source share
1 answer

Call replacefirst as:

$location.replace();
$location.path("somewhere");

I think this works too:

$location.replace().path("somewhere");
+2
source

All Articles