I\'m using Expressjs as an API and I\'m using angular to hit that POST. I would like to respond to the redirect that express is sending. Success from my Angular POST returns
AngularJS is meant to work as a client-side framework coupled with (mostly) RESTfull APIs. Your login API isn't supposed to return a HTML, it is supposed to return the instruction to redirect. So in your case you should simply call $location.url('/')
in your $http
success callback, which would use the Angular router to "redirect" to '/' (the root URL).