Skip to content

Instantly share code, notes, and snippets.

@jaredwilli
Forked from ajoslin/gist:3181630
Created August 28, 2013 19:32
Show Gist options
  • Save jaredwilli/6370233 to your computer and use it in GitHub Desktop.
Save jaredwilli/6370233 to your computer and use it in GitHub Desktop.
<!-- Tab links at top, always visible with one 'active' -->
<ul class="nav nav-tabs">
<li ng-repeat="tab in tabs" ng-class="{active: selectedTab == tab}" ng-click="selectedTab = tab">
<a ng-href="#{{tab.id}}">{{tab.title}}</a>
</li>
</ul>
<!-- Tab contents, only one ever visible -->
<div class="tab-content">
<div ng-repeat="tab in tabs" class="tab-pane" ng-class="selectedTab == tab && 'active' || 'hide'" id="{{tab.id}}">
<!-- can have tabs' content be ng-included as a template, or just put html here -->
<div ng-include="tab.templateUrl"></div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment