Skip to content

Commit

Permalink
fixes angular#1907: $route property not available on next and current…
Browse files Browse the repository at this point in the history
… parameters in $routeChangeStart for default route
  • Loading branch information
maciejblinkbox committed Jan 31, 2013
1 parent 649b892 commit 0f82486
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 @@ -466,7 +466,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:{}});

This comment has been minimized.

Copy link
@IgorMinar

IgorMinar Feb 1, 2013

why not ...{params: extend({}, $location.search(), pathParams: {}});

match.$route = routes[null];
}
return match;
}

/**
Expand Down

0 comments on commit 0f82486

Please sign in to comment.