title: How to go to the url return by a restful service as response
body: <p>I am calling a java restful service in angularjs</p>
  
  <pre><code>  $http
    .post($scope.url,datatest)
    .success(function(data) {
      console.log('success');
   // console.log(data);
      $scope.responseURL=data;
      console.log($scope.responseURL);
    })
   .error(function(data) {
                          console.log('error');
                      });
  </code></pre>
  
  <p>Here the data is containing a url and I want to go to that url after success of service call.</p>
  
  <p>Actually this is a transaction page where use will hit place Order button and then a service will be called which will return the url of payment getway.
  Now I am supposed to redirect to that payment getway url.</p>
  
  <p>Thanks</p>
  
  <p><strong>Edit:</strong>
  Both the answer bellow are correct but the problem was, I was getting url as 'www.xyz.com/abc....' that's why it was being appended in the current url.</p>
  
  <p>So I just prefixed the response url wiht 'http://' and it worked both way, the same tab and new tab as well.</p>