I have a action method in controller which returns json result as:
public ActionResult GetByDids(int id)
{
AngularMVCEntities _db = new AngularMVCEntities();
var emps = _db.Employees.Where(x => x.Did == id).ToList();
return Json(emps, JsonRequestBehavior.AllowGet);
}
And a code in angular js like:
app.controller('employeesController', function ($scope, $http) {
$scope.GetEmployeesByDid = function (did) {
alert('Get Employees By Id' + ' ' + did);
$http.get('/Employees/GetByDids', { params: { id: did } }).then(function (response) {
$scope.Emps = response.data;
});
};
});
How to convert the json DATE to string?