<mat-tab-group [selectedIndex]="selectedIndex.value" (selectedIndexChange)="selectedIndex.setValue($event)" dynamicHeight>
  <mat-tab *ngFor="let path of _tabs; let index = index" [label]="path">
    <ng-template mat-tab-label>
      <div class="tab" title="{{path}}">
        <span>{{getFileName(path)}}</span>
        <div style="flex:1">
        </div>
          <mat-icon class="" (click)="removeTab(path)">close</mat-icon>
      </div>
    </ng-template>
  </mat-tab>
</mat-tab-group>