title: Angular2+ Using NgFor to create mat-tab with the same content
body: <p>I am using ngFor to create some tabs according to a list with the mat-tab material.</p>
  
  <p>However, I would like to only have a unique content. 
  Indeed, the content is a graph and only the data changed. Therefore, when I click on one of the tabs, it calls the function <strong>onTabChanged()</strong> and the variable <em>data</em> is updated in the &lt; nvd3 >.</p>
  
  <p>This does not work properly. Because it creates three times nvd3.</p>
  
  <p>In fact, I would like the tabs acting like a button. Because I tried some buttons but I prefer the design of the tabs.</p>
  
  <pre><code>&lt;mat-tab-group class="col-10 offset-1" (selectedTabChange)="onTabChanged($event)"&gt;
    &lt;mat-tab label={{tab.type}} *ngFor="let tab of datasetList; let index = index"&gt;
      &lt;div&gt;
        &lt;nvd3 #nvd3 [options]="chart" [data]="data"&gt;&lt;/nvd3&gt;
      &lt;/div&gt;
    &lt;/mat-tab&gt;
  &lt;/mat-tab-group&gt;
  </code></pre>