title: How to pass model data from partial view to JavaScript?
body: <p>I have a strongly typed with A model Partial view.</p>
  
  <p>Is it possible to pass the model data to an external JavaScript?</p>
  
  <p>My partial view temporary is like this:</p>
  
  <pre><code>@model MyProject.Models.myModel
  &lt;script src=".../myScript.js"&gt;&lt;script&gt;
  &lt;span&gt;
        @Html.DisplayFor(model =&gt; model)
        //how do I pass data to myScript.js?
  &lt;/span&gt;
  </code></pre>
  
  <p>In external JavaScript (myScript.js):</p>
  
  <pre><code>$(document).ready(function () {
      //how do I get data from the partial view?
  })
  </code></pre>