I am using AngularJS to get data from an ASP.NET server application and display it on the client side. Here is what I\'m getting:
In your ASP.NET MVC domain model have an extra property that renders the format expected by angular.
public string CreatedOnJson
{
get
{
return JsonConvert.SerializeObject(CreatedOn, new JavaScriptDateTimeConverter()).Replace("new Date(","").Replace(")","");
}
}
That way you can the use the angular date filter do display in way you prefer:
{{team.CreatedOn | date:'yyyy-MM' }}