2

I have a special requirement for my project where I use Angular-UI-Bootstrap to create a tabbed view.

<uib-tab data-ng-repeat="pageTitle in form.pagetitles" heading="{{pageTitle}}"> 
    // tab content and so on...
</uib-tab>

I want to have a Button next to the Tab-Heading with a linked ng-click function. In this function I want to remove the page (still implemented, no help needed here).

<button data-ng-click='removePage(pageTitle)' class='btn btn-default'><span class='glyphicon glyphicon-wrench'></span></button>

My Problem: I do not have an idea how to get the button next to the heading. Can anyone help me?

1 Answer 1

4

Instead of using the attribute "heading" use the tag: <uib-tab-heading>

Something like:

<uib-tab data-ng-repeat="pageTitle in form.pagetitles">
  <uib-tab-heading>
    <div class="pull-left">{{pageTitle}}</div>
    <div class="pull-right">
      <button data-ng-click='removePage(pageTitle)' class='btn btn-default'><span class='glyphicon glyphicon-wrench'></span></button>
    </div>
  </uib-tab-heading>
  // tab content and so on...
</uib-tab>
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.