Steve Steve - 1 month ago 9x
Javascript Question

Disabling a static tab with Angular UI Bootstrap?

I am trying to set a tab to be disabled in a Angular Ui-bootstrap 2.0 tabset.

In the example on their site, the one they are enabling and disabling (with a button) is a dynamic tab (an ng-repeat). I tried that, it works.

I am trying to disable a Tab in a set that's not created with an ng-repeat, and it does not seem to work. I have hard-coded the disabled property. I tried using a simple "true" and a controller property. The tab remains selectable.

<uib-tabset active="active">
<uib-tab index="0" heading="Static title">
Lorem ipsum dolor sit amet
<uib-tab index="1" heading="Another static title">
Consectetur adipisicing elit.
<uib-tab index="2" heading="Still another static title" disabled="amDisabled">

$scope = amDisabled = true

Here is a plunker.


You need to use the disable attribute not disabled

Here is the same plunker with the disable attribute

It's an easy mistake to make!