This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4629071
commit aaa8d81
Showing
4 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
<div ng-controller="TabsDemoCtrl"> | ||
<h3>Basic tabs</h3> | ||
<tabs> | ||
<pane heading="Static title">Static content</pane> | ||
<pane ng-repeat="pane in panes" heading="{{pane.title}}" active="pane.active">{{pane.content}}</pane> | ||
<pane heading="Static title" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin lacinia, ante sit amet pharetra vulputate, augue velit dignissim libero, in blandit neque sapien at sapien. Sed lacinia tellus quis risus consectetur egestas. In hac habitasse platea dictumst. | ||
</pane> | ||
<pane ng-repeat="pane in panes" heading="{{pane.title}}" active="pane.active" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;">{{pane.content}}</pane> | ||
</tabs> | ||
<p> | ||
<button class="btn btn-mini" ng-click="panes[0].active = true">Select second tab</button> | ||
<button class="btn btn-mini" ng-click="panes[1].active = true">Select third tab</button> | ||
</p> | ||
<h3>Different tab placements</h3> | ||
<h4>Left</h4> | ||
<tabs placement="left"> | ||
<pane ng-repeat="pane in panes" heading="{{pane.title}}">{{pane.content}}</pane> | ||
</tabs> | ||
<h4>Right</h4> | ||
<tabs placement="right"> | ||
<pane ng-repeat="pane in panes" heading="{{pane.title}}">{{pane.content}}</pane> | ||
</tabs> | ||
<div class="row-fluid"> | ||
<button class="btn" ng-click="panes[0].active = true">Select second tab</button> | ||
<button class="btn" ng-click="panes[1].active = true">Select third tab</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
AngularJS version of the tabs directive. | ||
AngularJS version of the tabs directive. | ||
|
||
Individual tabs can be created statically, from markup, or generated from model using the `ng-repeat directive`. | ||
|
||
Tabs selection can be driven by mouse `click` event or in response to model changes (see the `active` attribute). | ||
|
||
It is also possible to change placement of tabs using the `placement` attribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aaa8d81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Pawel,
this looks like a quite good solution to the problem discussed. I would vote for it. :-)
aaa8d81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool :-)
There are only 2 problems:
ng-switch
and would make a template somehow more complex (not to mention new scope created...). But we could start without thebottom
option.aaa8d81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there,