title: load script tags inside div
body: <p>I have dynamically loaded a page with <code>div id="example"</code>. So only the contents of the id will be executed. I also have script tag inside div which is not being executed. I have tried using eval but it failed.</p>
  
  <pre><code>&lt;div id="example"&gt;
      &lt;script&gt;
          alert("Welcome");
      &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In a js file,</p>
  
  <pre><code>var ele=document.getElementByTagName('script');
  eval(ele.innerHTML);
  </code></pre>
  
  <p>Attached the plunker link below
  <a href="https://plnkr.co/edit/LrfxZERqI6gYhKbGvNwQ?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/LrfxZERqI6gYhKbGvNwQ?p=preview</a></p>