Issue with Angular UI bootstrap static tab default selection

62 Views Asked by At

i am facing an issue with angular bootstrap ui static tabs default selection.

I have around seven tab like this in a model popup. I want to set default tab based on value. i have done something like this

<uib-tab select="getCurrentTab('basic')" active="active.two"  heading="Basic">

in script

 $scope.active={
   one:false,
  two: true
 }

Issue is it always selects the first tab,irrespective of the scope field

1

There are 1 best solutions below

0
On

ng-class="{active: active.two}"

Set the active class using ng-class This may help you.