ng2-bootstrap-base-modified
Version:
Native Angular Bootstrap Components Typeahead modified
28 lines (27 loc) • 1 kB
HTML
<div (click)="$event.preventDefault()">
<p>Select a tab by setting active binding to true:</p>
<p>
<button type="button" class="btn btn-primary btn-sm" (click)="tabs[0].active = true">Select second tab</button>
<button type="button" class="btn btn-primary btn-sm" (click)="tabs[1].active = true">Select third tab</button>
</p>
<p>
<button type="button" class="btn btn-primary btn-sm" (click)="tabs[1].disabled = ! tabs[1].disabled">
Enable / Disable third tab
</button>
</p>
<hr/>
<tabset>
<tab heading="Static title">Static content</tab>
<tab *ngFor="let tabz of tabs"
[heading]="tabz.title"
[active]="tabz.active"
(select)="tabz.active = true"
(deselect)="tabz.active = false"
[disabled]="tabz.disabled"
[removable]="tabz.removable"
(removed)="removeTabHandler(tabz)"
[customClass]="tabz.customClass">
{{tabz?.content}}
</tab>
</tabset>
</div>