3

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>
  <uib-tab index="1" heading="Another static title">
   Consectetur adipisicing elit.
  </uib-tab>
  <uib-tab index="2" heading="Still another static title" disabled="amDisabled">
    Recusandae
  </uib-tab>

where $scope = amDisabled = true

Here is a plunker.

1 Answer 1

10

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.