title: Playframework: Elegant way to pass values to javascript
body: <p>Does anyone have an elegant solution to pass server values to javascript (that is not inline) in playframework? just like ${x} or &amp;{'x'} inside html</p>
  
  <p>Currently I can think of</p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
       var x= ${x};
    &lt;/script&gt;
    &lt;script src="/public/javascripts/jsThatUsesX.js" type="text/javascript" &gt;&lt;/script&gt;
  </code></pre>
  
  <p>I'm thinking there is a better solution from play</p>