mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
109 lines
3.0 KiB
HTML
109 lines
3.0 KiB
HTML
<html ng-app="slideBoxTest">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Slide Box</title>
|
|
|
|
<!-- Sets initial viewport load and disables zooming -->
|
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
<link rel="stylesheet" href="../../../../dist/css/ionic.css">
|
|
<script src="../../../../dist/js/ionic.js"></script>
|
|
<script src="../../../../dist/js/angular/angular.js"></script>
|
|
<script src="../../../../dist/js/angular/angular-animate.js"></script>
|
|
<script src="../../../../dist/js/angular/angular-route.js"></script>
|
|
<script src="../../../../dist/js/angular/angular-touch.js"></script>
|
|
<script src="../../../../dist/js/angular/angular-sanitize.js"></script>
|
|
<script src="../../../../dist/js/ionic-angular.js"></script>
|
|
<style>
|
|
.box {
|
|
width: 100%;
|
|
height: 100%;
|
|
padding-top: 80px;
|
|
color: #000;
|
|
background-color: #fff;
|
|
text-align: center;
|
|
}
|
|
.box > * {
|
|
font-weight: 100;
|
|
font-family: 'Helvetica Neue';
|
|
}
|
|
.blue {
|
|
background-color: rgb(71, 138, 238);
|
|
}
|
|
.yellow {
|
|
background-color: rgb(233, 233, 109);
|
|
}
|
|
.pink {
|
|
background-color: rgb(233, 109, 233);
|
|
}
|
|
.slider-pager .slider-pager-page {
|
|
color: #000;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div ng-controller="SlideCtrl">
|
|
<header-bar left-buttons="leftButtons" right-buttons="rightButtons" title=""></header-bar>
|
|
<slide-box on-slide-changed="slideChanged(index)">
|
|
<slide>
|
|
<div class="box">
|
|
<h3>Thank you for choosing my app!</h3>
|
|
<p>
|
|
We've worked super hard to make you happy.
|
|
</p>
|
|
<p>
|
|
But if you are angry, please contact us at support@example.com
|
|
</p>
|
|
</div>
|
|
</slide>
|
|
<slide>
|
|
<div class="box">
|
|
</div>
|
|
</slide>
|
|
<slide>
|
|
<div class="box">
|
|
</div>
|
|
</slide>
|
|
</slide-box>
|
|
</div>
|
|
<script>
|
|
angular.module('slideBoxTest', ['ionic'])
|
|
|
|
.controller('SlideCtrl', function($scope) {
|
|
$scope.leftButtons = [
|
|
{
|
|
content: 'Skip',
|
|
type: 'button-positive button-clear',
|
|
onTap: function(e) {
|
|
}
|
|
}
|
|
];
|
|
$scope.slideChanged = function(index) {
|
|
console.log('Slide changed', index);
|
|
if(index == 2) {
|
|
$scope.rightButtons = [
|
|
{
|
|
content: 'Start using MyApp',
|
|
type: 'button-positive button-clear',
|
|
onTap: function(e) {
|
|
}
|
|
}
|
|
];
|
|
} else {
|
|
$scope.rightButtons = [
|
|
{
|
|
content: 'Next',
|
|
type: 'button-positive button-clear',
|
|
onTap: function(e) {
|
|
}
|
|
}
|
|
];
|
|
}
|
|
$scope.$apply();
|
|
};
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|