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
I used the below code to redirect to new page
$window.location.href = '/foldername/page.html';
and injected $window object in my controller function.