Message from JavaScript discussions

November 2017


for (var row in rows) {
cdaTemplate.loadTemplate("#rowTemplate", "#templateContainer", {
append: true,
data: row

Message permanent page


<template id="rowTemplate">
<div data-content-text="column0"></div>
<div data-content-text="column1"></div>
<div data-content-text="column2"></div>
<div data-content-text="column3"></div>


var rows = [
column0: "Name",
column1: "Age",
column2: "Job",
column3: "Favorite Color"
column0: "Dani",
column1: "24",
column2: "SysAdmin",
column3: "Purple"

Message permanent page

— There, quick attempt :P

— Should generate this:

<div id="templateContainer">
<div>Favorite Color</div>


Message permanent page

— Which ofc needs extra styling, but that's good markup

— determin1st

— I imagine a simple flexbox would work great

— It can paginate as well

— Well it's not a framework lol, that's just how I'd do it myself

— Simple flexbox with wrap turned on, append the same row template over and over

— That particular example is