EVOLUTION-MANAGER
Edit File: $routeParams.html
<a href='https://github.com/angular/angular.js/edit/v1.3.x/src/ngRoute/routeParams.js?message=docs($routeParams)%3A%20describe%20your%20change...#L6' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a> <a href='https://github.com/angular/angular.js/tree/v1.3.9/src/ngRoute/routeParams.js#L6' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in"> </i>View Source </a> <header class="api-profile-header"> <h1 class="api-profile-header-heading">$routeParams</h1> <ol class="api-profile-header-structure naked-list step-list"> <li> - service in module <a href="api/ngRoute">ngRoute</a> </li> </ol> </header> <div class="api-profile-description"> <p>The <code>$routeParams</code> service allows you to retrieve the current set of route parameters.</p> <p>Requires the <a href="api/ngRoute"><code>ngRoute</code></a> module to be installed.</p> <p>The route parameters are a combination of <a href="api/ng/service/$location"><code>$location</code></a>'s <a href="api/ng/service/$location#search"><code>search()</code></a> and <a href="api/ng/service/$location#path"><code>path()</code></a>. The <code>path</code> parameters are extracted when the <a href="api/ngRoute/service/$route"><code>$route</code></a> path is matched.</p> <p>In case of parameter name collision, <code>path</code> params take precedence over <code>search</code> params.</p> <p>The service guarantees that the identity of the <code>$routeParams</code> object will remain unchanged (but its properties will likely change) even when a route change occurs.</p> <p>Note that the <code>$routeParams</code> are only updated <em>after</em> a route change completes successfully. This means that you cannot rely on <code>$routeParams</code> being correct in route resolve functions. Instead you can use <code>$route.current.params</code> to access the new route's parameters.</p> </div> <div> <h2 id="dependencies">Dependencies</h2> <ul> <li><a href="api/ngRoute/service/$route"><code>$route</code></a></li> </ul> <h2 id="example">Example</h2><pre><code class="lang-js">// Given: // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby // Route: /Chapter/:chapterId/Section/:sectionId // // Then $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'} </code></pre> </div>