Skip to content

Commit

Permalink
fix(urlRouter): allow .when() to redirect, even after a successful $s…
Browse files Browse the repository at this point in the history
…tate.go()

- This partially reverts a change from 0.2.13 intended to stop infinite redirects.
  - b267ecd
  - #1573
- This will be likely be re-reverted in 1.0

Closes #1584
  • Loading branch information
christopherthielen committed May 19, 2015
1 parent fbc8e42 commit 48aeaff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/urlRouter.js
Expand Up @@ -279,7 +279,8 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
if (evt && evt.defaultPrevented) return;
var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl;
lastPushedUrl = undefined;
if (ignoreUpdate) return true;
// TODO: Re-implement this in 1.0 for https://github.com/angular-ui/ui-router/issues/1573
//if (ignoreUpdate) return true;

function check(rule) {
var handled = rule($injector, $location);
Expand Down

0 comments on commit 48aeaff

Please sign in to comment.