Ons-lazy-repeat

Developer
Size
1,905 Kb
Views
70,840

How do I make an ons-lazy-repeat?

The ng-click set in the HTML Element created with createItemContent does not work.. What is a ons-lazy-repeat? How do you make a ons-lazy-repeat? This script and codes were developed by Keiji Odagawa on 10 September 2022, Saturday.

Ons-lazy-repeat Previews

Ons-lazy-repeat - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>ons-lazy-repeat</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 ng-controller="ListController as list"> <ons-list> <ons-lazy-repeat id="list"> <ons-list-item> <div ng-click="list.popUp()">test</div> <!--div onclick="popUp()">test</div--> </ons-list-item> </ons-lazy-repeat> </ons-list>
</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-lazy-repeat - Script Codes JS Codes

ons.bootstrap()
.controller('ListController', function() { document.addEventListener('init', getList, false); this.popUp = function() { alert('hoge') }; /*popUp = function() { alert('hoge') };*/ function getList() { var lazyRepeat = document.getElementById('list'); lazyRepeat.delegate = { createItemContent: function(i, template) { var dom = template.cloneNode(true); return dom; }, countItems: function() { return 15; }, destroyItem: function(index, item) { // console.log('Destroyed item with index: ' + index); } }; lazyRepeat.refresh(); }
});
Ons-lazy-repeat - Script Codes
Ons-lazy-repeat - Script Codes
Home Page Home
Developer Keiji Odagawa
Username keiji
Uploaded September 10, 2022
Rating 3
Size 1,905 Kb
Views 70,840
Do you need developer help for Ons-lazy-repeat?

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 art & images 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!