Skip to content

Commit 9f2b2d2

Browse files
committed
1.5.0
1 parent 615d65d commit 9f2b2d2

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-route-segment",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"main": "build/angular-route-segment.js",
55
"ignore": [
66
"**/.*",

build/angular-route-segment.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* angular-route-segment 1.4.0
2+
* angular-route-segment 1.5.0
33
* https://angular-route-segment.com
44
* @author Artem Chivchalov
55
* @license MIT License http://opensource.org/licenses/MIT
@@ -124,12 +124,17 @@ mod.provider( '$routeSegment',
124124

125125
/**
126126
* The shorthand for $routeProvider.when() method with specified route name.
127-
* @param {string} route Route URL, e.g. '/foo/bar'
127+
* @param {string} path Route URL, e.g. '/foo/bar'
128128
* @param {string} name Fully qualified route name, e.g. 'foo.bar'
129+
* @param {Object} route Mapping information to be assigned to $route.current on route match.
129130
*/
130-
$routeSegmentProvider.when = function(route, name) {
131-
$routeProvider.when(route, {segment: name});
132-
segmentRoutes[name] = route;
131+
$routeSegmentProvider.when = function(path, name, route) {
132+
if (route == undefined)
133+
route = {};
134+
route.segment = name;
135+
136+
$routeProvider.when(path, route);
137+
segmentRoutes[name] = path;
133138
return this;
134139
};
135140

build/angular-route-segment.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-route-segment",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"devDependencies": {
55
"grunt": "",
66
"grunt-contrib-uglify": "",

0 commit comments

Comments
 (0)