I am using ajax call to perform functionality in a service file and if the response is successful, I want to redirect the page to another url. Currently, I am doing this by
You can redirect to a new URL in different ways.
$location.path(YOUR_URL); or $location.url(YOUR_URL);. So the basic difference between the 2 methods is that $location.url() also affects get parameters whilst $location.path() does not.I would recommend reading the docs on $location and $window so you get a better grasp on the differences between them.