Reputation: 2804
As I know, this is to visit a route and pass param to the url
$location.path('/home').search({key:'value'})
This is to clear every param and url and visit the route, history is keep
$location.search('').path('/home');
How about don't keep the history? Like transactional flow, once the user paid, you don't want to let the user to be able to go back. I know there's history service but I think there's more simpler way to do it. I tried to use valina javascript redirect method but it reloaded the entire page which is inconsisten for my SPA.
Upvotes: 1
Views: 37