You could take your entire server-side model and turn it into a Javascript object by doing the following:(您可以通过执行以下操作来获取整个服务器端模型并将其转换为Javascript对象:)
var model = @Html.Raw(Json.Encode(Model));
In your case if you just want the FloorPlanSettings object, simply pass the Encode
method that property:(在您的情况下,如果您只想要FloorPlanSettings对象,只需传递Encode
方法的属性:)
var floorplanSettings = @Html.Raw(Json.Encode(Model.FloorPlanSettings));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…