how do you pass parameters to a mustache template

358 views
Skip to first unread message

Ron Smith

unread,
Oct 29, 2011, 8:30:36 PM10/29/11
to Bowler Users
Hi - I'm sorry for a newbie question - I have a controller function
like:

get("/") ((request, response) => {

render(Map("url" -> "http://www.mysite.com/"))
})

and a mustache template like:

<html>
<body>
{{url}}
</body>
</html>

But the parameter is not passed through to the template - what am I
doing wrong?

Wille Faler

unread,
Oct 30, 2011, 8:26:23 AM10/30/11
to bowler...@googlegroups.com
Hi,
This would probably work better:
render(ViewModel("url","http://www.mysite.com/")

This gives you a good overview of how the rendering works: http://bowlerframework.org/manual.html#resourceview
Reply all
Reply to author
Forward
0 new messages