Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit b074d71

Browse files
committed
refactor(ngRoute): do not unnecessarily return originalPath in routeToRegExp
1 parent a43a40b commit b074d71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ngRoute/route.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ function $RouteProvider() {
225225
}
226226
routes[path] = angular.extend(
227227
routeCopy,
228+
{originalPath: path},
228229
path && routeToRegExp(path, routeCopy)
229230
);
230231

@@ -235,7 +236,7 @@ function $RouteProvider() {
235236
: path + '/';
236237

237238
routes[redirectPath] = angular.extend(
238-
{redirectTo: path},
239+
{originalPath: path, redirectTo: path},
239240
routeToRegExp(redirectPath, routeCopy)
240241
);
241242
}

src/routeToRegExp.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ function routeToRegExp(pathOrUrl, opts) {
3636
}
3737

3838
return {
39-
originalPath: pathOrUrl,
4039
keys: keys,
4140
regexp: new RegExp(
4241
'^' + pattern + '(?:[?#]|$)',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy