mgcrea.ngStrap.tab
Add quick, dynamic tab functionality to transition through panes of local content.
$scope.tabs = {{tabs | json}};
Append a bs-tabs
attribute to any element to enable the directive.
Pane animation is done with ngClass('active')
callbacks and require custom CSS.
.tabs.animation-fade .tab-pane {
opacity: 1;
transition: opacity .3s ease;
min-height:60px;
&.active-add {
display: block;
opacity: 0;
&.active-add-active {
opacity: 1;
}
}
&.active-remove {
display: none;
}
}
Options can be passed via data attributes or as an AngularJS expression to evaluate as an object on
bs-tabs
. For data attributes, append the option name to data-
, as in data-animation=""
.
Name | type | default | description |
---|---|---|---|
animation | string | animation-fade | apply a CSS animation to the popover with ngAnimate |
template | path | false |
If a remote URL is provided, overrides the default template |
You can override global defaults for the plugin with $tabProvider.defaults
angular.module('myApp')
.config(function($tabProvider) {
angular.extend($tabProvider.defaults, {
animation: 'animation-flipX'
});
})