title: AngularJS: Read route param from within controller
body: <p>How can a parameter from an URL be read within an AngularJS controller?</p>
  
  <p>Let's say I have an URL like <code>http://localhost/var/:value</code> and I want the value to be stored in a variable within the controller for the <code>/var/:value</code> URL.</p>
  
  <p>I have tried using <code>$routeParams.value</code> and <code>$route.current.params.value</code> but <code>$routeParams</code> is undefined at the beginning and <code>$route</code> doesn't work.</p>