The question is fairly self explanatory.
If I open a web socket connection in an Angular JS via a controller, it will remain open after navigation (route change).
This is normal behaviour of course, but I was wondering what might be the "best practice" way to request the connection be closed upon navigation.
I could obviously hook in to the $routeChange...
methods and broadcast to the controller. But am I missing something? Is there a better way?