title: Bootstrap Accordion example not working with Angular 4 [innerHTML]
body: <p>I'm trying to implement the <strong>Bootstrap Accordion example</strong> in my <strong>Angular 4</strong> app.</p>
  
  <pre><code>&lt;div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"&gt;
  &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading" role="tab" id="headingOne"&gt;
          &lt;h4 class="panel-title"&gt;
              &lt;a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"&gt;
                  Collapsible Group Item #1
              &lt;/a&gt;
          &lt;/h4&gt;
      &lt;/div&gt;
      &lt;div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne"&gt;
          &lt;div class="panel-body"&gt;
              Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading" role="tab" id="headingTwo"&gt;
          &lt;h4 class="panel-title"&gt;
              &lt;a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"&gt;
                  Collapsible Group Item #2
              &lt;/a&gt;
          &lt;/h4&gt;
      &lt;/div&gt;
      &lt;div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo"&gt;
          &lt;div class="panel-body"&gt;
              Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading" role="tab" id="headingThree"&gt;
          &lt;h4 class="panel-title"&gt;
              &lt;a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"&gt;
                  Collapsible Group Item #3
              &lt;/a&gt;
          &lt;/h4&gt;
      &lt;/div&gt;
      &lt;div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree"&gt;
          &lt;div class="panel-body"&gt;
              Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>
  It works like a charm when I put this code in my html file directly but when i try to pass this code dynamically in my html file as <code>[innerHTML]</code> it doesn't work.</p>
  
  <p>I've inspected in dev tools and found that in the case of the latter the anchor tag only has</p>
  
  <pre><code>&lt;a class="collapsed" role="button" href="#collapseOne"&gt;
  </code></pre>
  
  <p>instead of </p>
  
  <p><code>&lt;a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"&gt;</code></p>
  
  <p>I also think that it has got nothing to do with <code>ViewEncapsulation.None</code> as I've tried that and it doesn't help. I've also tried used <code>@ng-bootstrap/ng-bootstrap</code>.</p>
  
  <p>I'm new to Angular and trying to understand what is it that I am missing? Any help is highly appreciated.</p>