wish of those help yeah, you are right. onExit is called when you remove node from it's parent, or when it's parent is removed from the stage/other parent.
Define the onEnter and onExit callbacks in another file with Angular UI Router
By : Dara
Date : March 29 2020, 07:55 AM
To fix the issue you can do You can do this, but it without knowing more this is a code smell. You are mixing logic between controllers and states, but they should be separate. Anyway, here's how you can do this: