title: Cannot get current route. $location.path() returns empty.
body: <p>I am currently at <code>/addDoc</code>, and I want current route I am at. Here is my controller:</p>
  
  <pre><code>app.controller('DocRegistrationController',[ '$http', '$scope', '$upload', '$location', function($http, $scope, $upload, $location){
  $scope.validation=function(){
     alert($location.path());
  }
      }
  </code></pre>
  
  <p>However it returns empty. I dont want to hardcode all the routes. What am I doing wrong?</p>