Initializing Vue data with AJAX

后端 未结 3 2057
日久生厌
日久生厌 2021-02-01 13:39

I\'m trying to populate a Vue with data from the JsonResult of an AJAX query. My Vue receives the data just fine when I encode it from my View Model, but not when I

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-01 14:30

    I was able to solve my problem by performing my necessary action within the success handler on the AJAX call. You can either put the entire Vue object creation in there, or just set the data you need.

提交回复
热议问题