title: Passing ng-directive to Leaflet L.popup().setContent()
body: <p>Thank you for giving my question a look.</p>
  
  <p><strong>Goal: Pass an Angular directive to the .setContent() method of L.popup()</strong></p>
  
  <p><strong>The Problem</strong>:</p>
  
  <p>I need to run $compile on the directive in order for it to enter ng.  But something like</p>
  
  <pre><code>.setContent($compile('&lt;new_marker_form&gt;&lt;/new_marker_form'))
  </code></pre>
  
  <p>yields a </p>
  
  <pre><code>Failed to execute 'appendChild' on 'Node': The new child element is null.
  </code></pre>
  
  <p>as I bet the ng is trying to compile before leaflet has actually appeneded any HTML.</p>
  
  <p>Not sure if this is better suited for Stack Overflow.  Please let me know if I ought to move it.</p>