title: Angular route parameters contraints
body: <p>I'm coming from the Asp.net MVC world where route constraints are really useful. I'm currently developing an Angular JS SPA that incorporates client side routing.</p>
  
  <p>I would also like to add parameter constraints to my client-side routes as in:</p>
  
  <pre><code>$.routeProvider.when("/post/:id/:name?")
  </code></pre>
  
  <p>where I'd like to constrain my <code>:id</code> parameter to only be valid when these are numbers.</p>
  
  <p>I haven't found anything similar in Angular Docs (which are horrible to say the least). Can it be done? And maybe also parameter defaults?</p>