14
14
< script src ="../../../../dist/js/angular/angular-sanitize.js "> </ script >
15
15
< script src ="../../../../dist/js/ionic-angular.js "> </ script >
16
16
< style >
17
- .box {
17
+ .slider-slide {
18
18
width : 100% ;
19
19
height : 100% ;
20
20
padding-top : 80px ;
21
21
color : # 000 ;
22
22
background-color : # fff ;
23
23
text-align : center;
24
+
25
+ font-family : "HelveticaNeue-Light" , "Helvetica Neue Light" , "Helvetica Neue" , Helvetica, Arial, "Lucida Grande" , sans-serif;
26
+ font-weight : 300 ;
24
27
}
25
- .box > * {
26
- font-weight : 100 ;
27
- font-family : 'Helvetica Neue' ;
28
+ .slider-pager .slider-pager-page {
29
+ color : # 000 ;
28
30
}
29
- .blue {
30
- background-color : rgb (71 , 138 , 238 );
31
+
32
+ # logo {
33
+ margin : 30px 0px ;
31
34
}
32
- .yellow {
33
- background-color : rgb (233 , 233 , 109 );
35
+
36
+ # list {
37
+ width : 170px ;
38
+ margin : 30px auto;
39
+ font-size : 20px ;
34
40
}
35
- . pink {
36
- background-color : rgb ( 233 , 109 , 233 ) ;
41
+ # list ol {
42
+ margin-top : 30 px ;
37
43
}
38
- .slider-pager .slider-pager-page {
39
- color : # 000 ;
44
+ # list ol li {
45
+ text-align : left;
46
+ list-style : decimal;
47
+ margin : 10px 0px ;
40
48
}
41
49
</ style >
42
50
</ head >
46
54
< header-bar left-buttons ="leftButtons " right-buttons ="rightButtons " title =""> </ header-bar >
47
55
< slide-box on-slide-changed ="slideChanged(index) ">
48
56
< slide >
49
- < div class ="box ">
50
- < h3 > Thank you for choosing my app!</ h3 >
51
- < p >
52
- We've worked super hard to make you happy.
53
- </ p >
54
- < p >
55
- But if you are angry, please contact us at
[email protected]
56
- </ p >
57
+ < h3 > Thank you for choosing the Awesome App!</ h3 >
58
+ < div id ="logo ">
59
+ < img src ="app_icon.png ">
57
60
</ div >
61
+ < p >
62
+ We've worked super hard to make you happy.
63
+ </ p >
64
+ < p >
65
+ But if you are angry, too bad.
66
+ </ p >
58
67
</ slide >
59
68
< slide >
60
- < div class ="box ">
69
+ < h3 > Using Awesome</ h3 >
70
+
71
+ < div id ="list ">
72
+ < h5 > Just three steps:</ h5 >
73
+ < ol >
74
+ < li > Be awesome</ li >
75
+ < li > Stay awesome</ li >
76
+ < li > There is no step 3</ li >
77
+ </ ol >
61
78
</ div >
62
79
</ slide >
63
80
< slide >
64
- < div class ="box ">
65
- </ div >
81
+ < h3 > Any questions?</ h3 >
82
+ < p >
83
+ Too bad!
84
+ </ p >
66
85
</ slide >
67
86
</ slide-box >
68
87
</ div >
@@ -71,46 +90,64 @@ <h3>Thank you for choosing my app!</h3>
71
90
72
91
. controller ( 'SlideCtrl' , function ( $scope ) {
73
92
$scope . next = function ( ) {
93
+ console . log ( 'NEXT' ) ;
94
+ $scope . $broadcast ( 'slideBox.nextSlide' ) ;
74
95
} ;
75
- $scope . rightButtons = [
96
+
97
+ var rightButtons = [
76
98
{
77
99
content : 'Next' ,
78
100
type : 'button-positive button-clear' ,
79
- onTap : function ( e ) {
101
+ tap : function ( e ) {
102
+ console . log ( 'NEXT' ) ;
80
103
$scope . next ( ) ;
81
104
}
82
105
}
83
106
] ;
84
- $scope . leftButtons = [
107
+ var leftButtons = [
85
108
{
86
109
content : 'Skip' ,
87
110
type : 'button-positive button-clear' ,
88
- onTap : function ( e ) {
111
+ tap : function ( e ) {
112
+ alert ( 'Skipping' ) ;
89
113
}
90
114
}
91
115
] ;
116
+
117
+ $scope . leftButtons = leftButtons ;
118
+ $scope . rightButtons = rightButtons ;
119
+
120
+
92
121
$scope . slideChanged = function ( index ) {
93
122
console . log ( 'Slide changed' , index ) ;
94
- if ( index == 2 ) {
95
- $scope . rightButtons = [
123
+
124
+ if ( index > 0 ) {
125
+ $scope . leftButtons = [
96
126
{
97
- content : 'Start using MyApp ' ,
127
+ content : 'Back ' ,
98
128
type : 'button-positive button-clear' ,
99
- onTap : function ( e ) {
129
+ tap : function ( e ) {
130
+ $scope . $broadcast ( 'slideBox.prevSlide' ) ;
100
131
}
101
132
}
102
133
] ;
103
134
} else {
135
+ $scope . leftButtons = leftButtons ;
136
+ }
137
+
138
+ if ( index == 2 ) {
104
139
$scope . rightButtons = [
105
140
{
106
- content : 'Next ' ,
141
+ content : 'Start using MyApp ' ,
107
142
type : 'button-positive button-clear' ,
108
- onTap : function ( e ) {
143
+ tap : function ( e ) {
144
+ alert ( 'Done!' ) ;
109
145
}
110
146
}
111
147
] ;
148
+ } else {
149
+ $scope . rightButtons = rightButtons ;
112
150
}
113
- $scope . $apply ( ) ;
114
151
} ;
115
152
} ) ;
116
153
</ script >
0 commit comments