<nz-tabset class="tabs" nzType="card" [nzSelectedIndex]="selectedIndex">
  <nz-tab *ngFor="let tab of tabService.tabs" [nzTitle]="tabTemplate"  (nzClick)="selectTab(tab.path)">
    <ng-template #tabTemplate>
      <div (contextmenu)="onRightClick($event, tab)"><span>{{ tab.title }}</span><i *ngIf="tab.closable && tabService.tabs.length > 1" nz-icon nzType="close" class="ant-tabs-close-x" (click)="closeTab(tab.path, $event)"></i></div>
    </ng-template>
  </nz-tab>
</nz-tabset>
<app-tab-context-menu
  *ngIf="showContextMenu"
  [x]="contextMenuPosition.x"
  [y]="contextMenuPosition.y"
  [event]="event"
  (closeOthers)="closeOtherTabs()">
</app-tab-context-menu>
