mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Fixed #360 - dynamic slidebox sizing
This commit is contained in:
89
js/ext/angular/test/slideBoxDynamic.html
Normal file
89
js/ext/angular/test/slideBoxDynamic.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<html ng-app="slideBoxTest">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Dynamic 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/angular-ui/angular-ui-router.js"></script>
|
||||
<script src="../../../../dist/js/ionic-angular.js"></script>
|
||||
<style>
|
||||
.slider-slide {
|
||||
padding-top: 80px;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
|
||||
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||
font-weight: 300;
|
||||
}
|
||||
.slider-pager .slider-pager-page {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#logo {
|
||||
margin: 30px 0px;
|
||||
}
|
||||
|
||||
#list {
|
||||
width: 170px;
|
||||
margin: 30px auto;
|
||||
font-size: 20px;
|
||||
}
|
||||
#list ol {
|
||||
margin-top: 30px;
|
||||
}
|
||||
#list ol li {
|
||||
text-align: left;
|
||||
list-style: decimal;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div ng-controller="SlideCtrl">
|
||||
<pane>
|
||||
<header-bar left-buttons="leftButtons" right-buttons="rightButtons" title=""></header-bar>
|
||||
<content has-header="true">
|
||||
<slide-box>
|
||||
<slide ng-repeat="page in pages">
|
||||
{{page.text}}
|
||||
</slide>
|
||||
</slide-box>
|
||||
</content>
|
||||
</pane>
|
||||
</div>
|
||||
<script>
|
||||
angular.module('slideBoxTest', ['ionic'])
|
||||
|
||||
.controller('SlideCtrl', function($scope, $timeout, SlideBoxDelegate) {
|
||||
|
||||
$timeout(function() {
|
||||
$scope.pages = [ {
|
||||
text:
|
||||
'This is a really long page text\
|
||||
This is a really long page text\
|
||||
This is a really long page text\
|
||||
This is a really long page text\
|
||||
This is a really long page text\
|
||||
This is a really long page text\
|
||||
This is a really long page text'
|
||||
}
|
||||
];
|
||||
|
||||
SlideBoxDelegate.update();
|
||||
}, 100);
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user