I have a series of data that I bring from the server controller in an MVC.
As you can see in the image, the value of the date arrives well. When I save it in the Json to send it it is also saved well.
return new JsonResult()
{
Data = data,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
But when I see it on the screen, I find this:
In the HTML code, I simply do the binding, but the data has already arrived badly at this point.
<table class='table'>
<thead>
<tr>
<th>Nombre de usuario</th>
<th>Rol</th>
<th>Estado</th>
<th>Fecha</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="usuario in data">
<td>{{usuario.Nombre}}</td>
<td>{{usuario.RolNombre}}</td>
<td>{{usuario.EstadoNombre}}</td>
<td>{{usuario.FechaAlta}}</td>
</tr>
</tbody>
</table>
Let's see if anyone is able to lend me a hand ... other than the neck:)
I'm commenting on you.
{{usuario.FechaAlta | date:'dd-MM-yyyy'}}
It does not work for me, I've tried it, but as the 'badly formed' data arrives it does not work anymore
{ FechaAlta: $filter('date')(parseInt("/Date(1238540400000)/".substr(6)), 'dd/MM/yyyy') }
That option more or less I had thought about it but since I have a list of users I would have to create a buble to apply the change to all the records and it is not the option that I like the most.
And the last option is the same as this one :(
First of all I return to thank you because there are many options that you give me :) The only thing that the idea that I have is that I could deal with the data that already comes from the HTML if it were possible, the same can not be done, ...