title: Communicate with an AngularJS Directive that manipulates DOM
body: <p>I am currently developing a simple one-page app where you click some <code>&lt;li&gt;</code> and you are able to send some data with <code>ngClick</code>. This <code>&lt;li&gt;</code>s have a parent <code>&lt;div&gt;</code> where I apply CSS styles with <code>angular.element</code> and all that stuff...</p>
  
  <p>The problem is when I click this <code>ngClick</code> I do some <code>$http</code> calls and get a JSON to fill an internal controller variable. So, when the user clicks other menu that has nothing in common (in terms of controllers and directives) I fill other list and when the user clicks this list, I have to style the <code>&lt;li&gt;</code>s I mentioned before, that is a directive.</p>
  
  <p>So, I don't know how to tell the <code>link</code> reference on the <code>directive</code>, that it must style with some properties that I don't know how to pass too, maybe a service to read ? I thought of using a service to store the info to pass from the controller to the directive, but I am new to Angular and am not sure what to do. I searched a lot but didn't find exactly what I am looking for. I thought of using <code>$watch</code> but my variables to watch that are on a controller, so I must go to parent scope like 2 times back to reach it.</p>
  
  <p>Thanks a lot !</p>