title: Access a Model property in a javascript file?
body: <p>Is it possible to access a Model property in an external Javascript file?</p>
  
  <p>e.g. In "somescript.js" file</p>
  
  <pre><code>var currency = '@Model.Currency';
  alert(currency);
  </code></pre>
  
  <p>On my View</p>
  
  <pre><code>&lt;script src="../../Scripts/somescript.js" type="text/javascript"&gt;
  </code></pre>
  
  <p>This doesn't appear to work, however if I put the javascript directly into the view inside script tags then it does work?  This means having to put the code in the page all the time instead of loading the external script file like this:</p>
  
  <pre><code>@model MyModel;
  
  &lt;script lang=, type=&gt;
  var currency = '@Model.Currency';
  alert(currency);
  &lt;/script&gt;
  </code></pre>
  
  <p>Is there any way around this?</p>