title: AngularJS - looking to add and remove an iframe based on dom events
body: <p>I would like to add an iframe to a page when certain links are clicked and remove it when other mouse events happen on the page.  From what I can see, it seems that using an AngularJS directive would be the best way to do this.  What I'm not sure about is what is the best way to format the directive.  I'm thinking of making the directive at the attribute level...something like this:</p>
  
  <pre><code>&lt;div myIframeDirective&gt;&lt;/div&gt;
  </code></pre>
  
  <p>What I'm not sure of is the best way of removing/adding the directive contents (an iframe and a header above it) when various click events happen on the main page.  Not looking for anyone to write the code for me...just looking for examples of how this can be best accomplished.</p>