title: Angularjs app.js getting URL
body: <p>In angularjs, do we have anything on app.js level to determine the application URL.</p>
  
  <p>I know inside the application, we can use $location.path() to determine it, but app.js we dont have $location</p>
  
  <p>Basically, the need is to enable and disable the console logging for the application using a URL param switch.</p>
  
  <p>Idea is </p>
  
  <p><a href="http://www.test-website.com/" rel="nofollow">http://www.test-website.com/</a> - Will run and not fetch console.log</p>
  
  <p><a href="http://www.test-website.com?debug=1" rel="nofollow">http://www.test-website.com?debug=1</a> - Will run and fetch console.log (s) for the application.</p>
  
  <p>Thanks in advance!!!</p>