Using ASP.Net MVC and AngularJS I tested the contents of a view field like this:
$scope.estado.ldRedeBasica = @(Model.ldRedeBasica == null ? "[]" : Html.Raw(Model.ldRedeBasica));
Only returned the following error:
Compiler Error Message: CS0173: The conditional expression type can not be determined because there is no implicit conversion between 'string' and 'System.Web.IHtmlString'
The interesting thing is that in another part of the code it works:
$scope.ViewBag.Impostos = @(ViewBag.Impostos == null ? "[]" : Html.Raw(ViewBag.Impostos));
How to work around this problem?