(Note this is a Scalate Jade, if that matters)
I have the following route:
get("/fruit") { contentType = "text/html" jade("fruity", "fruit" -> "apple") }
And this fruity.jade template:
-@ val fruit: String p Alerting #{fruit} :javascript alert("#{fruit}");
It looks like this:
<body><p>Alerting apple</p> <script type="text/javascript"> //<![CDATA[ alert("#{fruit}"); //]]> </script> </body>
The fruit value is not interpolated for the javascript part. How can I make it allow in javascript?
source share