I have 4 tabs, all of them have a controller. The data are injected into the $scope
by using the resolve
property that calls a service. One action in tab A should refresh tab B if the controller B has already been created.
What is the best way to communicate from tab A to tab B controllers?
Option 1: broadcast an event from the parent controller of all tabs: $scope.$parent.$broadcast
and $scope.on
Option 2: $rootScope.$emit
+ $rootScope.$on
Another option?