title: How to set a specific tab always active in Material tab group while opening Bootstrap Modal multiple times?
body: <p>I used Material tab group in Bootstrap Modal. I always want the 2nd tab active. If I set <code>[selectedIndex]='1'</code>, I get the 2nd tab active while opening the modal first time. But after opening first time, if I select 3rd tab and close the modal and reopen the modal, I get the 3rd tab active, not the 2nd tab. </p>
  
  <p>How can I always get the 2nd tab active while opening the modal?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"&gt;
    Launch demo modal
  &lt;/button&gt;
  
  &lt;div class="modal" tabindex="-1" role="dialog" id="exampleModal"&gt;
    &lt;div class="modal-dialog modal-lg" role="document"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;h5 class="modal-title"&gt;Modal title&lt;/h5&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
            &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
          &lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          &lt;mat-tab-group [selectedIndex]='1'&gt;
            &lt;mat-tab label="First"&gt; Content 1 &lt;/mat-tab&gt;
            &lt;mat-tab label="Second"&gt; Content 2 &lt;/mat-tab&gt;
            &lt;mat-tab label="Third"&gt; Content 3 &lt;/mat-tab&gt;
          &lt;/mat-tab-group&gt;
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>