Skip to content

Commit

Permalink
fix for angular#1907 $route property not available on next and curren…
Browse files Browse the repository at this point in the history
…t parameters in $routeChangeStart for default route
  • Loading branch information
maciejblinkbox committed Jan 31, 2013
1 parent 652feeb commit fc9b392
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ng/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,11 @@ function $RouteProvider(){
}
});
// No route matched; fallback to "otherwise" route
return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
if (!match && routes[null]) {
match = inherit(routes[null], {params: {}, pathParams:{}});
match.$route = routes[null];
}
return match;
}

/**
Expand Down

0 comments on commit fc9b392

Please sign in to comment.