/**
* The main component that renders single TabComponent
* instances.
*/
import {Component, ContentChildren, EventEmitter, Input, Output, QueryList,} from '@angular/core';
import {TabComponent} from './tab.component';
@Component({
selector: 'my-tabs',
template: `
`
})
export class TabsComponent {
@Input()
public customClass: string;
@ContentChildren(TabComponent) tabs: QueryList;
@Output() public selectedActiveTab: EventEmitter = new EventEmitter();
selectTab(tab: TabComponent){
// activate the tab the user has clicked on.
this.selectedActiveTab.emit(tab.tabId);
}
}