Iram Khan

Iram Khan

  • 1.9k
  • 51
  • 1.2k

Json data not formatting in view

Feb 2 2018 12:14 PM
I am fetching data in MVC and returning as Json. Although i am receving it in Angular controller but still getting Json in raw format.
Here is my MVC code...
public JsonResult Menu() {
var result = db.Departments.Include(y => y.Employee).ToList();
return Json(result, JsonRequestBehavior.AllowGet);
and here is my Angular Controller.
angular.module('ContactController', []).controller("ContactController", ['$scope', '$http', function ($scope, $http) {
$scope.model = {};
$http.get('/Contact/Menu').then(function(response) {
$scope.model =;
Here is View..
<tr ng-repeat="x in model">

and output in view is like this:
any idea what m i missing??? 

Brought to you by:

Answers (2)