Closed oleduc closed 9 years ago
Hi @oleduc ,
Without taking too much look, in loss of time at the moment, I would suggest trying to think of most of this logic as part of your store. You can access the $rootScope there to set page title and description. You could even argue doing the $state.go inside a store.
There you could return a call to a different store method (which you access by action here). That should solve the issue.
Sorry to be so short and abstract, I can take a closer look if you have not found a solution by the time I am back :-)
Closed this, old issue
Hello this is a quick question.
How does one go about calling an action in a emitChange() handler without getting the "Error: Cannot call dispatch while another dispatch is executing. Attempted to execute 'some-action' but 'some-other-action' is already executing." error.
Example:
Is this case, I would expect the action to be queued after the current dispatch instead of throwing. But my guess is that I don't quite understand how FLUX dispatch works.
Of course, one could always user a $timeout, but this is a pretty bad hack and I'm sure there must be a way to handle this.
Your help would be very much appreciated! And GREAT work on the library, we are very much appreciative of your efforts!