当前位置:AngularJS API / ngRoute / 服务(service) / $routeParams
$routeParams
$routeParams服务运行检索当前路由的参数集。
$route
// 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'}