Skip to content

Commit fc9b392

Browse files
fix for angular#1907 $route property not available on next and current parameters in $routeChangeStart for default route
1 parent 652feeb commit fc9b392

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
@@ -445,7 +445,11 @@ function $RouteProvider(){
445445
}
446446
});
447447
// No route matched; fallback to "otherwise" route
448-
return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
448+
if (!match && routes[null]) {
449+
match = inherit(routes[null], {params: {}, pathParams:{}});
450+
match.$route = routes[null];
451+
}
452+
return match;
449453
}
450454

451455
/**

0 commit comments

Comments
 (0)