onTabClick(tab: TabComponent) { this.currentTab = tab; } isSelected(tab: TabComponent) { return this.currentTab.name === tab.name; }