#/order/123?status=success
hits the route '/order/:id' and takes to OrderCtrl.
Once we access the $routeParams.query, we want to clear the url to #/order/123. How can this be achieved?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using the
$locationservice, you can remove the search param by assigning it a null value:But you should note that, by default, this will reload the current route. If you don’t want to reload the current route, you can disable that in your route definition:
But the
$routeUpdatewill still fire and can be reacted to.