I am wondering which is best practise, or perhaps in which situation one way is preferred over the other.
The setup is as follows if we use a parent(main) controller:
<div ng-controller="Controller Main">
<div ng-controller="Controller 1"></div>
<div ng-controller="Controller 2"></div>
</div>
So we can communicate here because both controller 1 and 2 have access to Controller Main's scope.
The other way is if we use a service,
<div ng-controller="Controller 1"></div>
<div ng-controller="Controller 2"></div>
So what I think we're doing is that we inject the service to the controllers.
I've seen both solutions but I don't know which one is preferred.