title: Fetch URI segment value - The angular way?
body: <p>I have this crud URL format:</p>
  
  <blockquote>
    <p>domain.com/config/someconfig/edit/2</p>
  </blockquote>
  
  <p>Where I open the form ready to be prepped with the contents from record of id 2.</p>
  
  <p><strong>How</strong>, can I just get the 2 from the URI?</p>
  
  <p>The easiest way possible would be something like:</p>
  
  <pre><code>if($location._uriseg(4) &amp;&amp; typeof $location._uriseg(4) === 'number') then...
  </code></pre>
  
  <p>Is angular.js missing something like this?</p>