I'm currently dealing with an issue where I need to transition to the state of another controller. I understand that in this scenario I must modify the location to load the desired controller, but how do I specify which state to enter?
It's worth noting that I don't want this change to be applied globally. While I know that using
$rootScope.$on('$locationChangeSuccess', function(e, newUrl, oldUrl){});
would work, I specifically want this to be a one-time occurrence.
Has anyone else encountered a similar problem? Any ideas on how I can achieve this?
@edit Additional information that might be helpful:
I have multiple states and the default state is not the one I need to access. Calling $state.go() won't work for me because it will load the new state within my current controller, which is not the desired outcome. This is why I need to adjust both the location and the state.