mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-21 17:00:24 +00:00
we now have two types of namespaces: - true namespace: angular.* - used for all global apis - virtual namespace: ng.*, ngMock.*, ... - used for all DI modules the virual namespaces have services under the second namespace level (e.g. ng.) and filters and directives prefixed with filter: and directive: respectively (e.g. ng.filter:orderBy, ng.directive:ngRepeat) this simplifies urls and makes them a lot shorter while still avoiding name collisions
30 lines
925 B
JavaScript
30 lines
925 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* @ngdoc object
|
|
* @name ng.$routeParams
|
|
* @requires $route
|
|
*
|
|
* @description
|
|
* Current set of route parameters. The route parameters are a combination of the
|
|
* {@link ng.$location $location} `search()`, and `path()`. The `path` parameters
|
|
* are extracted when the {@link ng.$route $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.
|
|
*
|
|
* @example
|
|
* <pre>
|
|
* // 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'}
|
|
* </pre>
|
|
*/
|
|
function $RouteParamsProvider() {
|
|
this.$get = valueFn({});
|
|
}
|