We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4b30ef commit 2f1ebefCopy full SHA for 2f1ebef
src/urlRouter.js
@@ -305,12 +305,6 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
305
return listener;
306
}
307
308
- rules.sort(function(ruleA, ruleB) {
309
- var aLength = ruleA.prefix ? ruleA.prefix.length : 0;
310
- var bLength = ruleB.prefix ? ruleB.prefix.length : 0;
311
- return bLength - aLength;
312
- });
313
-
314
if (!interceptDeferred) listen();
315
316
return {
test/stateSpec.js
@@ -111,7 +111,7 @@ describe('state', function () {
111
112
})
113
.state('resolveTimeout', {
114
- url: "/:foo",
+ url: "/resolve-timeout/:foo",
115
resolve: {
116
value: function ($timeout) {
117
return $timeout(function() { log += "Success!"; }, 1);
test/urlRouterSpec.js
@@ -55,8 +55,6 @@ describe("UrlRouter", function () {
55
return path.replace('baz', 'b4z');
56
}).when('/foo/:param', function($match) {
57
match = ['/foo/:param', $match];
58
- }).when('/foo/bar', function($match) {
59
- match = ['/foo/bar', $match];
60
}).when('/bar', function($match) {
61
match = ['/bar', $match];
62
});
@@ -73,18 +71,6 @@ describe("UrlRouter", function () {
73
71
74
72
75
76
- it("should handle more specified url first", function() {
77
- location.path("/foo/bar");
78
- scope.$emit("$locationChangeSuccess");
79
- expect(match[0]).toBe("/foo/bar");
80
- expect(match[1]).toEqual({});
81
82
- location.path("/foo/baz");
83
84
- expect(match[0]).toBe("/foo/:param");
85
- expect(match[1]).toEqual({param: 'baz'});
86
87
88
it("should execute rewrite rules", function () {
89
location.path("/foo");
90
scope.$emit("$locationChangeSuccess");
0 commit comments