title: Interact with compiled Angular directives HTML
body: <p>I'm creating two Angular directives, <code>fooContainer</code> and <code>foo</code>, where the <code>fooContainer</code> will load one or more <code>foo</code> elements and render them inside its container.</p>
  
  <p>Now I also want to attach some JavaScript events to the <code>foo</code> directives compiled HTML from the <code>fooContainer</code> directives <code>link</code> function since the container is supposed to be responsible for some things like dragging the compiled <code>foo</code> elements around.</p>
  
  <p>Since $compile is asynchronous when compiling directives with <code>templateUrl</code> the HTML isn't available directly after calling <code>$compile(html)(scope)</code>, however if I use a timeout for about a second the HTML is rendered in and I can interact with it.</p>
  
  <p>This isn't optimal. Does $compile expose an event or promise I can use to be notified when all HTML is rendered?</p>
  
  <p>Here is a Plunker that describes my problem, <a href="http://plnkr.co/edit/coYdRqCsysV4txSFZ6DI?p=preview" rel="nofollow">http://plnkr.co/edit/coYdRqCsysV4txSFZ6DI?p=preview</a></p>