Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$location replace not removing entries from browser history

Tags:

angularjs

Any idea why neither:

$location.url(redirectURL,true);

~ OR ~

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

Are not replacing navigation history items? Or did I not understand what replace is supposed to do?

Thanks.

like image 590
Francisc Avatar asked Nov 01 '22 10:11

Francisc


1 Answers

Call replace first, as:

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

I think this works too:

$location.replace().path("somewhere");
like image 136
Nikos Paraskevopoulos Avatar answered Nov 15 '22 06:11

Nikos Paraskevopoulos