File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 7
7
"grunt-contrib-concat" : " " ,
8
8
"grunt-karma" : " " ,
9
9
"karma" : " " ,
10
- "karma-jasmine" : " " ,
10
+ "karma-jasmine" : " 0.1.5 " ,
11
11
"karma-phantomjs-launcher" : " " ,
12
12
"karma-junit-reporter" : " " ,
13
13
"grunt-git-describe" : " "
Original file line number Diff line number Diff line change @@ -118,12 +118,17 @@ mod.provider( '$routeSegment',
118
118
119
119
/**
120
120
* The shorthand for $routeProvider.when() method with specified route name.
121
- * @param {string } route Route URL, e.g. '/foo/bar'
121
+ * @param {string } path Route URL, e.g. '/foo/bar'
122
122
* @param {string } name Fully qualified route name, e.g. 'foo.bar'
123
+ * @param {Object } route Mapping information to be assigned to $route.current on route match.
123
124
*/
124
- $routeSegmentProvider . when = function ( route , name ) {
125
- $routeProvider . when ( route , { segment : name } ) ;
126
- segmentRoutes [ name ] = route ;
125
+ $routeSegmentProvider . when = function ( path , name , route ) {
126
+ if ( route == undefined )
127
+ route = { } ;
128
+ route . segment = name ;
129
+
130
+ $routeProvider . when ( path , route ) ;
131
+ segmentRoutes [ name ] = path ;
127
132
return this ;
128
133
} ;
129
134
You can’t perform that action at this time.
0 commit comments