For some reason this works in IE and Chrome but not Safari and firefox.
$location.path(lastPath);
$window.location.reload(true);
Instead of reloading the last path, $window.location.reload(true)
the current page is reloaded. Where as in Chrome an IE the reload occurs after angular's $location.path(lastPath)
occur.
Thanks. The below resolves the issue.
$window.location.href = lastPath;
You can do this:
$window.location.href='#/home';
$window.location.reload()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With