Skip to content

Commit c922707

Browse files
committed
Add a tabs page demonstrating md-tabs
1 parent 73873fe commit c922707

File tree

5 files changed

+42
-5
lines changed

5 files changed

+42
-5
lines changed

app/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<div ng-include="'views/sidenav.html'"></div>
2929
<div layout="column" layout-fill flex>
3030
<div ng-include="'views/toolbar.html'"></div>
31-
<md-content>
32-
<div layout-align="center center" ng-view=""></div>
31+
<md-content layout="column" layout-fill flex>
32+
<div layout-align="center center" ng-view="" layout-fill flex></div>
3333
</md-content>
3434
</div>
3535
<!-- build:js(.) scripts/oldieshim.js -->

app/scripts/router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ angular.module('yoAngularChromeApp')
2323
.when('/dialog', {
2424
templateUrl: 'views/dialog.html'
2525
})
26-
.when('/subheader', {
27-
templateUrl: 'views/list.html'
26+
.when('/tabs', {
27+
templateUrl: 'views/tabs.html'
2828
})
2929
.otherwise({
3030
redirectTo: '/'

app/views/dialog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<md-content class="md-padding" flex>
1+
<md-content class="md-padding" flex layout="column" layout-margin>
22
<h3>Ways to display various messages to a user</h3>
33

44
<md-button class="md-fab md-fab-bottom-right" aria-label="Time">

app/views/sidenav.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ <h3>List</h3>
9898
</a>
9999
</md-item-content>
100100
</md-item>
101+
<md-item>
102+
<md-item-content layout="row">
103+
<a class="menu-item menu-sub-item md-menu-item" ng-click="go('/tabs');" md-ink-ripple="#bbb" layout="row" layout-align="start center">
104+
<div class="md-tile-right" layout-align="center center">
105+
<i class="fa fa-fw fa-2x fa-tags"></i>
106+
</div>
107+
<div class="md-tile-content" layout-align="start center">
108+
<h3>Tabs</h3>
109+
<p>
110+
Demonstration of a pane with several tabs
111+
</p>
112+
</div>
113+
</a>
114+
</md-item-content>
115+
</md-item>
101116
</md-list>
102117
</section>
103118
</md-content>

app/views/tabs.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<md-content class="md-padding" flex layout="column" layout-fill>
2+
<h3>Tabs</h3>
3+
<p>Click the tab header change between tab contents</p>
4+
5+
<md-tabs layout="column" flex md-stretch-tabs="always">
6+
<md-tab label="1">
7+
<div layout="column" layout-fill layout-align="space-around center">
8+
<h1>A tab of content</h1>
9+
</div>
10+
</md-tab>
11+
<md-tab label="Disabled" class="md-accent" disabled="true">
12+
<div layout="column" layout-fill layout-align="space-around center">
13+
<h1>A third tab of content</h1>
14+
</div>
15+
</md-tab>
16+
<md-tab label="2" class="md-hue1">
17+
<div layout="column" layout-fill flex layout-align="space-around center" style="background-color:#fff000">
18+
<h1>A second tab of content</h1>
19+
</div>
20+
</md-tab>
21+
</md-tabs>
22+
</md-content>

0 commit comments

Comments
 (0)