When a child view is detached from it's parent, the next activated child view will no not receive messages from the dispatcher.
The issue is simple. I have a parent navigation menu. Clicking on that menu displays a child view. That child view’s data is populated by an action being invoked, which calls a mock service. The result of that service is retrieved from the action, the dispatcher is notified, then the dispatcher dispatches to the handlers (the store in this case). The store then notifies the child view that a new item has been selected. This works fine. But, selecting another item from the parent still does everything correctly except notifying the view model. I have found that removing the call to FluxDispatcher.instance.unregisterInstanceDispatcher(instance[Symbols.instanceDispatcher]) will solve the problem, but a memory leak occurs (of course).
I haven't been able to nail down why it is not reregistered. I've even tried to manually register the handler (dispatcher.handle(...)) in activate(), but that doesn't work either.
I have a plunk set up, but currently I cannot get it to run there. The plunk seems to fail at the registration of handlers in the flux-plugin. You can get to the plunk here. The code is available on github @ https://github.com/acidbluebriggs/aurelia-flux-example. This should run fine after the ceremonious npm install, jspm install.
When a child view is detached from it's parent, the next activated child view will no not receive messages from the dispatcher.
The issue is simple. I have a parent navigation menu. Clicking on that menu displays a child view. That child view’s data is populated by an action being invoked, which calls a mock service. The result of that service is retrieved from the action, the dispatcher is notified, then the dispatcher dispatches to the handlers (the store in this case). The store then notifies the child view that a new item has been selected. This works fine. But, selecting another item from the parent still does everything correctly except notifying the view model. I have found that removing the call to FluxDispatcher.instance.unregisterInstanceDispatcher(instance[Symbols.instanceDispatcher]) will solve the problem, but a memory leak occurs (of course).
I haven't been able to nail down why it is not reregistered. I've even tried to manually register the handler (dispatcher.handle(...)) in activate(), but that doesn't work either.
I have a plunk set up, but currently I cannot get it to run there. The plunk seems to fail at the registration of handlers in the flux-plugin. You can get to the plunk here. The code is available on github @ https://github.com/acidbluebriggs/aurelia-flux-example. This should run fine after the ceremonious npm install, jspm install.