zpt
Version:
Zenon Page Templates - JS (ZPT-JS)
51 lines (47 loc) • 1.65 kB
HTML
<html lang="es">
<head>
<meta charset="utf-8">
<title>loops tests</title>
<link rel="stylesheet" href="/node_modules/qunit/qunit/qunit.css">
<script src="/node_modules/qunit/qunit/qunit.js" defer></script>
<script type="module" src="js/app/nestedLoops.js"></script>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<p>
Try out nested loops
</p>
<p>
Try out nested loops with numeric arrays
</p>
<ol id="2NestedLoops">
<ol data-repeat="list someNumbers">
<li data-repeat="c list">
Iterating element
<span class="nestedValue1" data-content="c" data-attributes="id string:number${c}">10/20/30/40</span>
</li>
</ol>
</ol>
<p>
Try out nested loops with complex object
</p>
<ol id="toolsLoop">
<ol data-repeat="tool tools">
<span class="toolNames" data-content="tool/name" data-attributes="id string:tool${tool/id}">Tool X</span>
<li data-repeat="c tool/numbers">
Iterating element
<span class="toolNumbers" data-content="c" data-attributes="id string:toolNumber${tool/id}${c}">
10/20/30
</span>
</li>
</ol>
</ol>
</body>
</html>