I googled around on how to pass mvc model to knockoutjs and it seems there are two ways:
- Using @Html.Raw(Json.Encode(Model))
- Using $.get or $.ajax
Which of the ways is a best practice of passing mvc model to knockoutjs? I know it is a per requirement basis but it seems using $.get is more cleaner versus the @Html.Raw method.