title: How can I insert a Bootstrap modal, containing AngularJS, using .innerHTML then manually open it?
body: <p>When my page loads this is what I am trying to get it to do:</p>
  
  <pre><code>$(function () {
      urlExtract = location.hash
      foundExtract = urlExtract.split("#/")[1];
      if(foundExtract == "zsexdr"){
          var createModal = "";
  
          basicRep = document.getElementById('basicReports');
  
          createModal+='&lt;div class="modal fade" id="#waiverModal" role="dialog"&gt;';
          createModal+='&lt;div class="modal-dialog modal-sm"&gt;';
          createModal+='&lt;div class="modal-content"&gt;';
          createModal+='&lt;div class="modal-header"&gt;';
          createModal+='&lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;';
          createModal+='&lt;h4 class="modal-title"&gt;{{z.name}} - Downloads&lt;/h4&gt;';
          createModal+='&lt;/div&gt;';
          createModal+='&lt;div class="modal-body"&gt;';
          createModal+='&lt;span ng-repeat="z in waiverModalLinks" class="{{z.id}}"&gt;&lt;a href="{{z.link}}{{z.title}}"&gt;{{z.title}}&lt;/a&gt;&lt;/span&gt;';
          createModal+='&lt;/div&gt;';
          createModal+='&lt;div class="modal-footer"&gt;';
          createModal+='&lt;/div&gt;';
          createModal+='&lt;/div&gt;';
          createModal+='&lt;/div&gt;';
          createModal+='&lt;/div&gt;';
  
          basicRep.innerHTML+=createModal;
  
          $('#waiverModal').modal('show');
      }
  })
  </code></pre>
  
  <p>The modal gets created and inserted into the HTML just fine, except that the AngularJS isn't registering, where it does register for other angular within the same <code>div id="basicReports"&gt;</code> I am using <code>ui.bootstrap</code> and I have gotten AngularJS to be inserted into a modal on a different page, but this is the first time I am attempting to insert the modal dynamically and have it opened programmatically. So I am not sure if I am doing it correctly.</p>
  
  <p>My main problem is, along with the Angular not registering, the modal is not opening. I know the modal is there because if I inspect element I can see it in the HTML</p>