I have a controller action that effectively simply returns a JsonResult of my model. So, in my method I have something like the following:
return new JsonRes
0
In your cshtml,
{{value.FileReceivedOn | mydate | date : 'dd-MM-yyyy'}}
In Your JS File, maybe app.js,
Outside of app.controller, add the below filter.
Here the "mydate" is the function which you are calling for parsing the date. Here the "app" is the variable which contains the angular.module
app.filter("mydate", function () {
var re = /\/Date\(([0-9]*)\)\//;
return function (x) {
var m = x.match(re);
if (m) return new Date(parseInt(m[1]));
else return null;
};
});