# `$routeParams` (service in module `ng` )

Improve this doc

## Description

Current set of route parameters. The route parameters are a combination of the `$location` `search()`, and `path()`. The `path` parameters are extracted when the `$route` path is matched.

In case of parameter name collision, `path` params take precedence over `search` params.

The service guarantees that the identity of the `$routeParams` object will remain unchanged (but its properties will likely change) even when a route change occurs.

## Dependencies

- `$route`

## Example

    // 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'}