Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 9592a24

Browse files
author
Adam Bradley
committed
update w/ ion- directives
1 parent c772a13 commit 9592a24

File tree

6 files changed

+48
-49
lines changed

6 files changed

+48
-49
lines changed

www/index.html

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,10 @@
1111
<!-- your app's css -->
1212
<link href="css/app.css" rel="stylesheet">
1313

14-
<!-- angularjs scripts -->
15-
<script src="lib/js/ionic.js"></script>
16-
<script src="lib/js/angular/angular.js"></script>
17-
<script src="lib/js/angular/angular-animate.js"></script>
18-
<script src="lib/js/angular/angular-sanitize.js"></script>
19-
<script src="lib/js/angular-ui/angular-ui-router.js"></script>
20-
<script src="lib/js/ionic-angular.js"></script>
21-
22-
<!-- cordova script -->
14+
<!-- ionic/angularjs scripts -->
15+
<script src="lib/js/ionic.bundle.js"></script>
16+
17+
<!-- cordova script (this will be a 404 during development) -->
2318
<script src="cordova.js"></script>
2419

2520
<!-- your app's script -->
@@ -35,20 +30,20 @@
3530

3631
<!--
3732
The nav bar that will be updated as we navigate between views
38-
Additional attributes set its look, nav-bar animation and icons
33+
Additional attributes set its look, ion-nav-bar animation and icons
3934
Icons provided by Ionicons: http://ionicons.com/
4035
-->
41-
<nav-bar type="bar-positive"
36+
<ion-nav-bar type="bar-positive"
4237
animation="nav-title-slide-ios7"
4338
back-button-type="button-icon"
44-
back-button-icon="ion-ios7-arrow-back"></nav-bar>
39+
back-button-icon="ion-ios7-arrow-back"></ion-nav-bar>
4540

4641
<!--
47-
The views will be rendered in the <nav-view> directive below
42+
The views will be rendered in the <ion-nav-view> directive below
4843
Templates are in the /templates folder (but you could also
4944
have templates inline in this html file if you'd like).
5045
-->
51-
<nav-view></nav-view>
46+
<ion-nav-view></ion-nav-view>
5247

5348
</body>
54-
</html>
49+
</html>

www/templates/about.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--
22
This template loads for the 'tab.about' state (app.js)
33
-->
4-
<view title="'About Ionic'">
5-
<content has-header="true" has-tabs="true" padding="true">
4+
<ion-view title="'About Ionic'">
5+
<ion-content has-header="true" has-tabs="true" padding="true">
66
<img src="img/ionic.png" class="ionic-logo">
77
<p>
88
This is a sample seed project for the Ionic Framework. Please cut it up and make it your own.
@@ -29,5 +29,5 @@
2929
<p>
3030
MIT Licensed. Happy coding.
3131
</p>
32-
</content>
33-
</view>
32+
</ion-content>
33+
</ion-view>

www/templates/adopt.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--
22
This template loads for the 'tab.adopt' state (app.js)
33
-->
4-
<view title="'Adopt A Pet'">
5-
<content has-header="true" has-tabs="true">
4+
<ion-view title="'Adopt A Pet'">
5+
<ion-content has-header="true" has-tabs="true">
66
<div class="list list-inset">
77
<label class="item item-input">
88
<span class="input-label">Your name</span>
@@ -12,8 +12,8 @@
1212
<span class="input-label">Your email</span>
1313
<input type="email">
1414
</label>
15-
<toggle>Subscribe To Newsletter</toggle>
15+
<ion-toggle>Subscribe To Newsletter</ion-toggle>
1616
<button class="button button-positive button-block">Adopt</button>
1717
</div>
18-
</content>
19-
</view>
18+
</ion-content>
19+
</ion-view>

www/templates/pet-detail.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
The PetCtrl pulls data from the Pets service (service.js)
55
The Pets service returns an array of pet data
66
-->
7-
<view title="pet.title">
8-
<content has-header="true" padding="true">
7+
<ion-view title="pet.title">
8+
<ion-content has-header="true" padding="true">
99
<p>{{ pet.description }}</p>
1010
<p><a class="button button-small icon ion-arrow-left-b" href="#/tab/pets"> All Pets</a></p>
11-
</content>
12-
</view>
11+
</ion-content>
12+
</ion-view>

www/templates/pet-index.html

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
<!--
2-
This template gets placed in the Pet tab's <nav-view> directive.
2+
This template gets placed in the Pet tab's <ion-nav-view> directive.
33
It was wired up in the app config (app.js)
44
The 'pets' data comes from its $scope within PetIndexCtrl (controller.js)
55
-->
6-
<view title="'Pet Information'">
7-
<content has-header="true" has-tabs="true">
8-
<list>
9-
<item ng-repeat="pet in pets" type="item-text-wrap" href="#/tab/pet/{{pet.id}}">
6+
<ion-view title="'Pet Information'">
7+
<ion-content has-header="true" has-tabs="true">
8+
9+
<ion-list>
10+
11+
<ion-item ng-repeat="pet in pets" type="item-text-wrap" href="#/tab/pet/{{pet.id}}">
1012
<h3>{{pet.title}}</h3>
1113
<p>{{pet.description}}</p>
12-
</item>
13-
</list>
14-
</content>
15-
</view>
14+
</ion-item>
15+
16+
</ion-list>
17+
18+
</ion-content>
19+
</ion-view>

www/templates/tabs.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11

22
<!--
33
Create tabs with an icon and label, using the tabs-positive style.
4-
Each tab's child <nav-view> directive will have its own
4+
Each tab's child <ion-nav-view> directive will have its own
55
navigation history that also transitions its views in and out.
66
-->
7-
<tabs tabs-style="tabs-icon-top" tabs-type="tabs-default">
7+
<ion-tabs tabs-style="tabs-icon-top" tabs-type="tabs-default">
88

99

1010
<!-- Pets Tab -->
11-
<tab title="Pets" icon="icon ion-home" href="#/tab/pets">
12-
<nav-view name="pets-tab"></nav-view>
13-
</tab>
11+
<ion-tab title="Pets" icon="icon ion-home" href="#/tab/pets">
12+
<ion-nav-view name="pets-tab"></ion-nav-view>
13+
</ion-tab>
1414

1515

1616
<!-- Adopt Tab -->
17-
<tab title="Adopt" icon="icon ion-heart" href="#/tab/adopt">
18-
<nav-view name="adopt-tab"></nav-view>
19-
</tab>
17+
<ion-tab title="Adopt" icon="icon ion-heart" href="#/tab/adopt">
18+
<ion-nav-view name="adopt-tab"></ion-nav-view>
19+
</ion-tab>
2020

2121

2222
<!-- About Tab -->
23-
<tab title="About" icon="icon ion-search" href="#/tab/about">
24-
<nav-view name="about-tab"></nav-view>
25-
</tab>
23+
<ion-tab title="About" icon="icon ion-search" href="#/tab/about">
24+
<ion-nav-view name="about-tab"></ion-nav-view>
25+
</ion-tab>
2626

2727

28-
</tabs>
28+
</ion-tabs>

0 commit comments

Comments
 (0)