Closed xeronimus closed 9 years ago
In some controllers, you want to send multiple commands simultaneously and do something if all of them "returned an event".
var promiseOne = CQRS.sendCommand({ command: 'move', payload: {attribute: 'one'} }); var promiseTwo = CQRS.sendCommand({ command: 'hop', payload: {attribute: 'two'} }); $q.all([promiseOne,promiseTwo]).then(function(){ // received matching events for both commands! });
In some controllers, you want to send multiple commands simultaneously and do something if all of them "returned an event".