Am 07.02.2014 05:41, schrieb Etienne:

On Fri, 07 Feb 2014 02:40:14 GMT, Florin wrote:

Hi,

Thing is Jade and Diet don't have support for data-bind="somestuff" style attributes or other popular JavaScript templating systems you might use with modern MV* libraries such as knockout, angular, etc. So is there a way to build with raw html instead of Diet?

Thanks,
Florin

The binding will happen in the browser, thus you can definitely use the regular sematics: input(data-bind='username[value]') is compiled by the diet template compiler into: <input data-bind='username[value]' />

If you really want to write raw html, you can put it on the right side of a vertical bar in diet templates:
| <div><div><input type="text" data-bind="someField" /></div></div>

Or if you want to send raw html directly to the output stream, use a bodyWriter and use the hundreds of different ways to build some D strings:

res.writeBody(string) and res.bodyWriter.write(string)

Just one thing to add: If you like writing plain HTML better in general
anyway, there are also some raw text based template systems that you
could look into:

http://code.dlang.org/packages/temple
http://code.dlang.org/packages/mustache-d
http://code.dlang.org/packages/embd

I think temple has the best vibe.d compatibility.