Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string source =
- @"<html>
- <head>
- <style type=""text/css"" href="styles.css">
- </head>
- <body>
- <div>
- <h1>{{title}}</h1>
- <div class="myclass">
- {{body}}
- </div>
- </div>
- </body>
- </html>";
- var template = Handlebars.Compile(source);
- var data = new {
- title = "My new post",
- body = "This is my first post!"
- };
- var result = template(data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement