I am using a urlRouterProvider for a default route on initial page loadup.
$urlRouterProvider.otherwise('/state1/welcome');
I have 2 state that loads different HTML pages. On the second state, I have a button that opens a modal and on the modal a cancel button that closes the modal.
$scope.modalInstance.dismiss("Cancel");
For some reason, calling this method will change my state from /state2/welcome to /start/welcome (The default). Why is it doing this and how do I prevent it from changing my state? I still need to keep the urlRouterProvider, but commenting that out seems to keep the state the same after closing the modal.