Ons-lazy-repeat
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 - 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(); }
});
Developer | Keiji Odagawa |
Username | keiji |
Uploaded | September 10, 2022 |
Rating | 3 |
Size | 1,905 Kb |
Views | 70,840 |
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!
Name | Size |
Ons-lazy-repeat | 1,846 Kb |
Ons-toolbar | 1,774 Kb |
Ons-carousel with ons-pull-hook | 2,072 Kb |
Use ons-navigator on ons-tabbar. | 1,930 Kb |
Ons-page in ons-carousel | 2,329 Kb |
Ons-list with ons-ons-carousel | 2,245 Kb |
Ons-modal | 1,764 Kb |
Ons-tabbar with ons-sliding-menu | 1,850 Kb |
Onsen UI | 1,843 Kb |
Ng-include Test | 1,744 Kb |
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!
Name | Username | Size |
Canvas snow | Win7killer | 2,572 Kb |
Count up | Alanshortis | 2,391 Kb |
Compare resources on mobile sites | Gyusza | 3,226 Kb |
Responsive Pricing Table | Jeremycaris | 2,690 Kb |
Update CSS Variables with JS | Wesbos | 2,335 Kb |
Flexbox playground | Enxaneta | 5,418 Kb |
Layout 11 | Altynai | 1,690 Kb |
Nav Test -- cats 1 | Payls | 4,735 Kb |
Birthday Party Starter | Aussieyang | 1,629 Kb |
Fluid Responsive Typography | Jonmilner | 4,205 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!