Reputation: 730
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.
Upvotes: 1
Views: 526
Reputation: 730
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
Upvotes: 1