title: Convert Asp.net core Page Modal object to Vue,js data object
body: <p>I am trying to mix Asp.netcore Razor Pages and Vue.js in a Project where  The page modal returned will contain the data and the Vue controller will use that data to do the Clientside rendering and other UI interactions </p>
  
  <p>Pagemodal.cs</p>
  
  <pre><code>   public class SampleQuestionModel : PageModel
      {
          public List&lt;QuestionViewModal&gt; questionViewModals = new List&lt;QuestionViewModal&gt;();
          public void OnGet()
          {
              MYEXAMAPI.Controllers.QuestionApiController questionApiController = new MYEXAMAPI.Controllers.QuestionApiController();
  
              questionViewModals = questionApiController.GetQuestion();
          }
      }
  </code></pre>
  
  <p>This is my Razor where I uses the page modal to show data</p>
  
  <pre><code>@page
  @model MYEXAM.SampleQuestionModel
  @{
      ViewData["Title"] = "SampleQuestion";
  }
  
  &lt;h1&gt;SampleQuestion&lt;/h1&gt;
  &lt;script src="~/js/vue.js"&gt;&lt;/script&gt;
  
  &lt;ul id="app"&gt;
      &lt;li v-for="item in questionViewModals"&gt;
          {{ item.fullQuestions }}
      &lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;script&gt;
  
      var vueApp = new Vue({
          el: '#app',
          data: {
              questionViewModals: @Json.Serialize(Model.questionViewModals) //This is not working 
          }
      })
  &lt;/script&gt;
  </code></pre>