1

I am trying to test the default redirect for my angularjs application based on angular ui router, No matter what I did, the otherwise config was ignored, I tried to forcefully call the update method of urlRouter, To achieve this I injected $urlRouter in my test. voila original code started working.

https://gist.github.com/himangshuj/8142045

This is the gist of my change. Revision 4 is the thing that worked.

1 Answer 1

1

If you're using $urlRouterProvider without $stateProvider, you have to inject $urlRouter in order for it to be initialized and properly hook into $location..

answered on github, it seems this is expected behavior

https://github.com/angular-ui/ui-router/issues/718#issuecomment-31246720

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.