Skip to content

Commit 0f82486

Browse files
fixes angular#1907: $route property not available on next and current parameters in $routeChangeStart for default route
1 parent 649b892 commit 0f82486

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ng/route.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,11 @@ function $RouteProvider(){
466466
}
467467
});
468468
// No route matched; fallback to "otherwise" route
469-
return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
469+
if (!match && routes[null]) {
470+
match = inherit(routes[null], {params: {}, pathParams:{}});
471+
match.$route = routes[null];
472+
}
473+
return match;
470474
}
471475

472476
/**

0 commit comments

Comments
 (0)