Simple tabs control for your angular2 applications using bootstrap3.
npm install ngx-tabsnpm install ngx-tabs --save
map and package config:
json
{
"map": {
"ngx-tabs": "node_modules/ngx-tabs"
},
"packages": {
"ngx-tabs": { "main": "index.js", "defaultExtension": "js" }
}
}
`
Usage
Import TabsModule in your app and start using a component:
`html
Dynamic html tab heading
Tab contents.
...
`
* is a container for all tabs
* [pills]="true|false" Specifies if bootstrap pills should be used instead of regular tabs
* (onSelect)="doSomethingOnTabSelect($event)" Callback to be called when tab is being selected
* is a single tab item
* title Simple tab title
* [disabled]="true|false Indicates if current tab is enabled or disabled
tabHeading>... Allows to specify dynamic html content of the tab title
Sample
`javascript
import {Component} from "@angular/core";
import {TabsModule} from "ngx-tabs";
@Component({
selector: "app",
template:
})
export class App {
}
@NgModule({
imports: [
// ...
TabsModule
],
declarations: [
App
],
bootstrap: [
App
]
})
export class AppModule {
}
``