Ons-page in ons-carousel

Developer
Size
2,329 Kb
Views
18,216

How do I make an ons-page in ons-carousel?

For iOS, there is space on the list.. What is a ons-page in ons-carousel? How do you make a ons-page in ons-carousel? This script and codes were developed by Keiji Odagawa on 19 December 2022, Monday.

Ons-page in ons-carousel Previews

Ons-page in ons-carousel - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>ons-page in ons-carousel</title> <link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsenui.css'>
<link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsen-css-components.css'>
</head>
<body> <ons-page> <ons-toolbar> <div class="left"> <ons-toolbar-button ng-click="carousel.prev()"> <ons-icon icon="md-chevron-left"></ons-icon> </ons-toolbar-button> </div> <div class="center">Carousel</div> <div class="right"> <ons-toolbar-button ng-click="carousel.next()"> <ons-icon icon="md-chevron-right"></ons-icon> </ons-toolbar-button> </div> </ons-toolbar> <ons-carousel var="carousel" ons-postchange="console.log('Changed to ' + $event.activeIndex)" fullscreen swipeable auto-scroll overscrollable> <ons-carousel-item style="background-color: #085078;"> <ons-page ng-controller="PageController as page"> <ons-pull-hook ng-action="page.load($done)" var="loader"> <span ng-switch="loader.state"> <span ng-switch-when="initial"><ons-icon size="35px" icon="ion-arrow-down-a"></ons-icon> Pull down to refresh</span> <span ng-switch-when="preaction"><ons-icon size="35px" icon="ion-arrow-up-a"></ons-icon> Release to refresh</span> <span ng-switch-when="action"><ons-icon size="35px" spin="true" icon="ion-load-d"></ons-icon> Loading data...</span> </span> </ons-pull-hook> <ons-list> <ons-list-item ons-lazy-repeat="page.delegate">{{ item }}</ons-list-item> </ons-list> </ons-page> </ons-carousel-item> <ons-carousel-item style="background-color: #373B44;"> <div style="text-align: center; font-size: 30px; margin-top: 20px; color: #fff;"> DARK </div> </ons-carousel-item> <ons-carousel-item style="background-color: #D38312;"> <div style="text-align: center; font-size: 30px; margin-top: 20px; color: #fff;"> ORANGE </div> </ons-carousel-item> </ons-carousel>
</ons-page> <script src='https://unpkg.com/onsenui/js/onsenui.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.min.js'></script>
<script src='https://unpkg.com/onsenui/js/angular-onsenui.js'></script> <script src="js/index.js"></script>
</body>
</html>

Ons-page in ons-carousel - Script Codes JS Codes

ons.bootstrap() .controller('PageController', function($timeout) { this.items = [3, 2, 1]; this.load = function($done) { $timeout(function() { // this.items.unshift(this.items.length + 1); $done(); }.bind(this), 1000); }.bind(this); this.delegate = { configureItemScope: function(index, itemScope) { itemScope.item = 'Item ' + index; }, countItems: function() { return 10000; }, calculateItemHeight: function() { return ons.platform.isAndroid() ? 48 : 44; } }; });
ons.ready(function() { console.log("Onsen UI is ready!");
});
Ons-page in ons-carousel - Script Codes
Ons-page in ons-carousel - Script Codes
Home Page Home
Developer Keiji Odagawa
Username keiji
Uploaded December 19, 2022
Rating 3
Size 2,329 Kb
Views 18,216
Do you need developer help for Ons-page in ons-carousel?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Keiji Odagawa (keiji) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!