Compose
Functional templating for Vala
using Compose;
using Compose.HTML5;
var app = new Valum.Router ();
app.get ("/users", () => {
var users = User.all ();
return res.expand_utf8 (
html ({},
head ({},
title ("My really amazing page"),
link ("/static/style.css")
),
body ({"lang=en"},
section ({"class=users"},
h2 ({}, "Users"),
take<User> (() => users.next (),
(user) => p (user.username)))
)
)
);
});HTML5
Utilities
When
Take
Last updated
Was this helpful?