title: change url on res.redirect in expressjs
body: <pre><code>app.get('/logout', function (req, res){
  
      req.url='/';
      console.log('req.url is ' + req.url);
  
      req.session.state = null;
  
      res.redirect('/login');
  });
  </code></pre>
  
  <p>upon redirect, the 'url' remains the same. I want it to change it too. Which i tried to do using req.url. But it does not reflect on the url-bar. How do you change that?</p>
  
  <p>Note:- I'm using Angularjs Routing so the <code>res.redirect</code> is not automatically updating the url.</p>
  
  <p>Edit:-
  Angular Code:-</p>
  
  <pre><code>$http({method: 'GET', url: '/logout'}).
          success(function(data, status, headers, config) {
            console.log('happened');
  
          }).
          error(function(data, status, headers, config) {
            // called asynchronously if an error occurs
            // or server returns response with an error status.
          });
  </code></pre>