title: How to pass custom values in an Angular $routeParams object?
body: <p>When configuring the Angular <code>$routeProvider</code>, I would like to specify my own custom values in the <code>routeObject</code> and retrieve them via the <code>$route</code> object that Angular injects.  Is there a proper way of doing this?</p>
  
  <p>Ex:</p>
  
  <pre><code>    $routeProvider
          .when('/administration/user/:id', {
              templateUrl: 'client/app/views/users-details.html',
              myCustomObject: { firstParam: "one", secondParam: "two"}
          })
  </code></pre>
  
  <p>I'm not quite sure how to retrieve this in a controller.  I see that I can access <code>myCustomObject</code> via:</p>
  
  <pre><code>$route.current.$$route.myCustomObject
  </code></pre>
  
  <p>however, I can't help but wonder if <code>$$route</code> is considered a private variable and shouldn't be accessed directly.  However, short of using convoluted <code>$q</code> promise in a resolve to inject the value, I don't see another way.</p>
  
  <p>Am I missing the obvious somewhere?  Is accessing my object via the <code>$$route</code> object an acceptable manner, or could this be problematic in a future Angular build?</p>