title: When does Angular add a directive template to the DOM?
body: <p>I need to use a Javascript library (scrollReveal) that assumes that the full DOM is ready. I am currently using AngularJS.</p>
  
  <p>The problem is, I don't know when to initialize scrollReveal via</p>
  
  <pre><code>window.sr = new scrollReveal();
  </code></pre>
  
  <p>If I do this in the link function of one directive, it may not apply to the template of another directive, because the other template may not have been added to the DOM yet.</p>
  
  <p>So I have two questions:</p>
  
  <p>1) At what time is the directive template added to the DOM? Does it differ if I use template vs templateUrl?</p>
  
  <p>2) How do I add in additional code that assumes a full DOM?</p>
  
  <p>Thanks.</p>