In this, the EventHandler and dispatching "method" only operate as expected until navigating away from the view. The view has a public, injected presentation model, the presentation has an injected service, a function that calls a method of that service, and an EventHandler that does something. The service has a dispatcher and a method that dispatches an event. The problem persists in this setup.
Unnecessary syntax has been removed for the following (pseudo)code:
View {
[Inject] pub : Presentation
}
Presentation {
[Inject] pub : Service
λ (
Service.method
)
[EventHandler(event 'event')] (
do
)
}
Service {
[Dispatcher]
method (
dispatch 'event'
)
}