Skip to content

Cure UI-Router infinite loop #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
osiloke opened this issue Feb 12, 2015 · 2 comments
Closed

Cure UI-Router infinite loop #312

osiloke opened this issue Feb 12, 2015 · 2 comments

Comments

@osiloke
Copy link

osiloke commented Feb 12, 2015

UI-Router appears to have a bug as mentioned at angular-ui/ui-router#600. It causes an infinite loop when you try to modify the state in the statechangestart event.

There is a workaround. It would be nice to add to the project

$urlRouterProvider.otherwise( function($injector, $location) {
            var $state = $injector.get("$state");
            $state.go("dashboard");
        });
@fzaninotto
Copy link
Member

Can you be more specific about the use case that would justify changing the state in the statechangestart event?

Also, the ng-admin router already does $urlRouterProvider.otherwise('/dashboard');. If your snippet solves a but, would you mind submitting a PR with the snippet and an e2e test demonstrating the bug?

@fzaninotto
Copy link
Member

Ne feedback for a few months, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants