I would put the navigation flow code in a global controller or service. You probably do not want your views or view models to have this logic, because they could take quite a few dependencies, especially if your stream is quite complex and customizable. Instead, you want these views and view models to be easily tested by unit, in which case they would put off what happens when they are done with someone who is in a better position to make an appropriate decision.
source
share