Working with $state from a sidemenu


My application uses a top nav, a bottom tab bar, and a side menu. The side menu is just a list of options which, if tapped, typically pop up a modal. One side menu action is login/logout.

In my main view, I want to be able to refresh the view whenever the user logins or logouts. The refresh code is simple enough:

$state.transitionTo($state.current, $stateParams, {
	reload: true,
	inherit: false,
	notify: true

In my main view I have data that displays in different ways depending on login status, thus the refresh after login/logout. When the user logs out, the refresh works fine. When the user logs in, it does not. The code for each is in the same place so I’m puzzled as to why it isn’t working on login. The refresh after login is located inside a success callback for $http so I wonder if that could be throwing off state.

Any suggestions?


Strike that, the problem was caused by an error in my code. It reloads as expected.