|
16 | 16 | * <pre> |
17 | 17 | * angular.module('App', ['ngRoute']); |
18 | 18 | * </pre> |
19 | | - * |
| 19 | + * |
20 | 20 | */ |
21 | 21 |
|
22 | 22 | var ngRouteModule = angular.module('ngRoute', ['ng']). |
@@ -47,8 +47,8 @@ function $RouteProvider(){ |
47 | 47 | * * `path` can contain named groups starting with a colon (`:name`). All characters up |
48 | 48 | * to the next slash are matched and stored in `$routeParams` under the given `name` |
49 | 49 | * when the route matches. |
50 | | - * * `path` can contain named groups starting with a colon and ending with a star (`:name*`). |
51 | | - * All characters are eagerly stored in `$routeParams` under the given `name` |
| 50 | + * * `path` can contain named groups starting with a colon and ending with a star (`:name*`). |
| 51 | + * All characters are eagerly stored in `$routeParams` under the given `name` |
52 | 52 | * when the route matches. |
53 | 53 | * * `path` can contain optional named groups with a question mark (`:name?`). |
54 | 54 | * |
@@ -139,8 +139,8 @@ function $RouteProvider(){ |
139 | 139 | // create redirection for trailing slashes |
140 | 140 | if (path) { |
141 | 141 | var redirectPath = (path[path.length-1] == '/') |
142 | | - ? path.substr(0, path.length-1) |
143 | | - : path +'/'; |
| 142 | + ? path.substr(0, path.length-1) |
| 143 | + : path +'/'; |
144 | 144 |
|
145 | 145 | routes[redirectPath] = extend( |
146 | 146 | {redirectTo: path}, |
@@ -439,13 +439,12 @@ function $RouteProvider(){ |
439 | 439 | var m = route.regexp.exec(on); |
440 | 440 | if (!m) return null; |
441 | 441 |
|
442 | | - var N = 0; |
443 | 442 | for (var i = 1, len = m.length; i < len; ++i) { |
444 | 443 | var key = keys[i - 1]; |
445 | 444 |
|
446 | 445 | var val = 'string' == typeof m[i] |
447 | | - ? decodeURIComponent(m[i]) |
448 | | - : m[i]; |
| 446 | + ? decodeURIComponent(m[i]) |
| 447 | + : m[i]; |
449 | 448 |
|
450 | 449 | if (key && val) { |
451 | 450 | params[key.name] = val; |
@@ -552,7 +551,7 @@ function $RouteProvider(){ |
552 | 551 | function interpolate(string, params) { |
553 | 552 | var result = []; |
554 | 553 | forEach((string||'').split(':'), function(segment, i) { |
555 | | - if (i == 0) { |
| 554 | + if (i === 0) { |
556 | 555 | result.push(segment); |
557 | 556 | } else { |
558 | 557 | var segmentMatch = segment.match(/(\w+)(.*)/); |
|
0 commit comments