title: How to read url param in angularjs
body: <p>Based on this URL, when it hits my angular controller, I need to get a value of wonum, which is "BRK18482020".</p>
  
  <p><a href="http://localhost/RealSuiteApps/RealHelp/-1/Detail?wonum=BRK18482020#/" rel="nofollow noreferrer">http://localhost/RealSuiteApps/RealHelp/-1/Detail?wonum=BRK18482020#/</a></p>
  
  <p><strong>Is it possible?</strong> cant understand how... </p>
  
  <p>documented $location service must work, but it doesnt work :(</p>
  
  <pre><code>constructor(private $location: ng.ILocationService) {
     var wonum = $location.search().wonum; // DOESNT WORK, wonum undefined
     var wonum2 = $location.search()['wonum']; // DOESNT WORK, wonum undefined
  </code></pre>
  
  <p><strong>doesnt work</strong></p>
  
  <p><a href="https://i.stack.imgur.com/KuqUi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KuqUi.png" alt="enter image description here"></a></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Obviously angularJS $location doesn't work.</p>
  
  <p>So, using the standard way to get the param works fine.</p>
  
  <pre><code>var wonum = window.location.search.split("wonum=")[1];
  </code></pre>