简体   繁体   English

Angular-Bootstrap UI选项卡:“删除”选项卡选项

[英]Angular-Bootstrap UI Tabs: Remove Tab Option

I have a special requirement for my project where I use Angular-UI-Bootstrap to create a tabbed view. 我对使用Angular-UI-Bootstrap创建选项卡式视图的项目有特殊要求。

<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. 我想在带有链接的ng-click函数的Tab-Heading旁边有一个Button。 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? 谁能帮我?

Instead of using the attribute "heading" use the tag: <uib-tab-heading> 代替使用属性“ heading”,使用标签:<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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM