I have a problem. I want to enter the state of another controller. I know that in this case I need to change the location to load this other controller, but how do I tell it to enter this state?
And what’s important, I don’t want to do it globally because I know I can do $rootScope.$on('$locationChangeSuccess', function(e, newUrl, oldUrl){});
it and it will work, but this time I want to do it only this time.
Has anyone had a similar problem? or have any ideas how I can do this?
@edit Additional information that may help:
I have more than one state, and the default state is not the one I want to enter. I cannot call $ state.go () because it will load this state in my current controller, and this is not the effect I want to achieve. So that’s why I need to change location and state
source
share