1) If your controllers are parent and you select an event from a child controller , you just need to fix this event, and the parent controller simply uses $ on to listen to it.
Emitting an event from a child controller:
$scope.SaveDB(iObj,function(iResult){ $scope.$emit('saveCallback',iResult);
Listening to an event (in the parent controller):
$scope.$on('saveCallback',function(event,iResult){
2) If your controllers are siblings
From your controller, you have an $emit event in the parent scope.
$scope.SaveDB(iObj,function(iResult){ $scope.$emit('saveCallback',iResult); });
Then your parent area listens for this event and $broadcast it to its children. This method can be written inside an angular module .run block
$scope.$on('saveCallback',function (event,iresult){ $scope.$broadcast('saveCallback',iresult); });
Or you can enter $ rootScope into the controller and pass the $ broadcast event to it:
$scope.SaveDB(iObj,function(iResult){ $rootScope.$broadcast('saveCallback',iResult); });
Areas interested in the event can subscribe to it:
$scope.$on('saveCallBack',function(event, data) {