title: Handle an express redirect from Angular POST
body: <p>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 a HTML of the page I intend to redirect to but nothing happens on my DOM. I can see that my redirect is working in my network traffic, and that console.log data, below contains the DOM of the redirected page.</p>
  
  <p>How can I refresh the DOM, to reflect this successful POST, or handle the "redirect"?</p>
  
  <p>ANGULAR CODE:</p>
  
  <pre><code>   $http({method: 'POST', url: '/login', data:FormData}).
        success(function(data, status, headers, config) {
        console.log(data)
      }).
        error(function(data, status, headers, config) {
      });
  
      $scope.userName = '';
  </code></pre>
  
  <p>Expressjs API:</p>
  
  <pre><code>    app.post('/login', function(req, res){
  
          var name = req.param('name', null);  // second parameter is default
      var password = req.param('password', "changeme")
  
      // Lots Authenticationcode
      // returns succesfful login
      res.redirect('http://localhost:3000/'); 
  
    }); // end app.post
  </code></pre>
  
  <p>console.log(data)  (from Angular POST success)</p>
  
  <pre><code>returns the HTML of the page I intended to redirect to
  </code></pre>