ng2-bootstrap-base-modified
Version:
Native Angular Bootstrap Components Typeahead modified
26 lines (20 loc) • 612 B
text/typescript
import { Component, ViewChild } from '@angular/core';
import { TabsetComponent } from 'ng2-bootstrap';
({
selector: 'demo-tabs-basic',
templateUrl: './basic.html'
})
export class DemoTabsBasicComponent {
('staticTabs') staticTabs: TabsetComponent;
public alertMe(): void {
setTimeout(function (): void {
alert('You\'ve selected the alert tab!');
});
}
selectTab(tab_id: number) {
this.staticTabs.tabs[tab_id].active = true;
}
disableEnable() {
this.staticTabs.tabs[2].disabled = ! this.staticTabs.tabs[2].disabled
}
}