title: How to communicate between controllers while not using SharedService between them?
body: <p>I was reading all the answers about communication between controllers and directive, but is seems to me occurred using shared service and inject it to each one of them. When I'm developing a very large scale application, I don't know what my page is going to have in it. I may have 2 controllers need to communicate between them, and I also may have 5 directive and 2 controllers in the same page. I don't know from scratch what is going to be inside my view/page, so I need a better way how to communicate between them. I'm looking for that better way to do it, the right AngularJS way.</p>
  
  <p><a href="http://i60.tinypic.com/2z87q05.png" rel="nofollow">http://i60.tinypic.com/2z87q05.png</a></p>
  
  <p><strong>Above is my view example I'm working on:</strong> on the left side I have a directive tree, on the right side I have chart controller and directive grid. I may have more than this, but this is a good example of what I may have. Keep in mind, the view can have X componenets, you don't know from the beginning what will be in it.</p>
  
  <p>Now, lets say each time I select node in tree on the left, I want to be able to tell the other controllers that nodeSelectedChange event happend. I don't want to inject each one of them a service that holds that info, so I thought about something like having a Page Manager Controller, which is the father of the all view. All my controllers/directives inside my page should talk with each other only by the PageManagerController, he is the only thing in page that knows what he has inside of it. </p>
  
  <p><strong>Important here to keep in mind:</strong> The tree don't know the page has chart or grid, they don't need to know each other in order to communicate. The page manager knows everything, now I want it to make the magic - Should it has a service? Should each other component has service and service can talk with PageManager service?</p>
  
  <p>Help me to think. Hope I can connect all the dots to create a BETTER way for communication.
  I think the sharedService way is good for small app, when you know from start what is going on in your app, but most of the time - You just don't know who and when is going to use your directive, it should be able to talk with everyone.</p>
  
  <p><strong>What I don't like about events:</strong></p>
  
  <ol>
  <li>The events being fired inside the controller, while it should be inside a service.</li>
  <li>The listener controller should know the name of the event he is going to listen too. If I change the event name being $emit or $broadcast, I need to go all over the listeners $on("eventName") in all app and change to that unique name.</li>
  <li>Directive is like a black box, I don't want to check inside of it each time and find the names of the events he is being broadcasting in order to communicate with it.</li>
  </ol>
  
  <p>I need a way to exposed the events NAMES out of the directive, probably with a service connected to that controller.</p>