Bootstrap: Tabs inside a modal

Bootstrap: Tabs inside a modal

I made a moda dialogl and now am trying to insert tabs into it, but having trouble getting the tabs to display content. Partial code of the tabs:
http://plnkr.co/edit/eGRmkzDvo4lYGCjzA5q7
How do I place tab pages inside a modal?

Solutions/Answers:

Solution 1:

http://plnkr.co/edit/Oj681B1YbLU1dJEiWHZp?p=preview

<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js"></script>

<div class="modal-header">
  <button type="button" class="close" data-dismiss="modal">×</button>
  <h3 ng-hide="newUser">Heading</h3>
</div>


<ul class="nav nav-tabs" id="tabContent">
    <li class="active"><a href="#details" data-toggle="tab">Details</a></li>
    <li><a href="#access-security" data-toggle="tab">Access / Security</a></li>
    <li><a href="#networking" data-toggle="tab">Networking</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="details">

            Details tab
       <div class="control-group">
           <label class="control-label">Instance Name</label>
       </div>
    </div>

    <div class="tab-pane" id="access-security">
        content 0
    </div> 
    <div class="tab-pane" id="networking">
        content 1
    </div> 
</div>

Solution 2:

You are missing the data-toggle attribute:

<li><a href="#details" data-toggle="tab">Details</a></li>

And the active state for whatever tab you want to show up first:

<li class="active"><a href="#details" data-toggle="tab">Details</a></li>
<div class="tab-pane active" id="details">

References

Related:  Bootstrap datepicker not close automatically after picking a date