The $routeParams service allows you to retrieve the current set of route parameters.

Requires the ngRoute module to be installed.

The route parameters are a combination of $location's search() and path(). The path parameters are extracted when the $routepath is matched.

 
JavaScript
// Given:
JavaScript
// URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
JavaScript
// Route: /Chapter/:chapterId/Section/:sectionId //
JavaScript
// Then
JavaScript
 $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}