When adding ImageModel to a view that is displays using react. I get a self referecing loop error when —>payload: @Html.Json(Model).
I tried to config the HttpConfiguration config with this:
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
but still doesn’t work.
Thanks in advance
Litium version: 7.2
You can add
GetUrlToImage property to fix the error. However, I think you should create your own model for this purpose, cause
ImageModel is not designed for using in React, as you can see, it does not contain the Url to the image, but the delegate to get the Url.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.