|
|
|
|
|
by saroskar
6019 days ago
|
|
One of the examples from the documentation to give HN readers a quick idea: var model = [
{name: "Lisa Simpson", id: 1},
{name: "Bart Simpson", id: 666}
] DIV(
{id:"demo-div", width: "60%"},
OL(
{style: "list-style-type: upper-roman"},
forEach(model, studentDetails)
)
).display(out);
out.flush(); function studentDetails(index, value) {
return LI(
value.name,
A(
{href:"/student-details?id="+value.id},
"details "+(index+1)
)
);
} |
|
(btw: Is it possible to call within a namespace, i.e. pjs.DIV( .. ), as opposed to DIV(..) ? Your examples seem to export the tags and forEach as globals).