Reputation: 103
I have a url in the form of url = localhost/abcd
. my present location is localhost/ghi?p=1
How can I do a redirect to the using $location. $location.path(url)
redirects me localhost/abcd?p=1. I want it to get redirected localhost/abcd
Upvotes: 0
Views: 20
Reputation: 637
You should use this like-
$location.path('/abcd');
I hope this will help you.
Upvotes: 1