title: Get the url present in window.history.back() in jquery
body: <p>I am new in angularjs I have created a back button for my application using the command <strong>window.history.back()</strong> </p>
  
  <pre><code>$scope.goBack = function() {
      $window.history.back();
  };
  </code></pre>
  
  <p>and I want that the back button will not be displayed in the first page i.e. index.html. So, I want the url that is present in <strong>window.history.back()</strong> so that I can check that if it is index.html then I can <strong>ng-hide</strong> it.</p>
  
  <p><strong>So is there any way so that I can get the relative url to which window.history.back() will redirect ?</strong></p>
  
  <p>Thanks in advance.</p>