So in any of my views if I fire someFunction() the modal arises. But the problem is behind the modal, the state transits to the state defined in $urlRouterProvide.otherwise("stateName") . If I close the modal, I can see that I will be in the 'home' state regardless of what my previous state was.
@bengtler yeah naturally I use ui-sref. but the href value got in there with the default value of # because of the sublime text snippet that I had written previously and used it pretty blindly in my app.