title: Model from AngularJS to ASP.NET MVC5
body: <p>I have some problems posting to my controller from Angular. If i post the variables separately, everything is fine, but when i combine my vars into one object that responds to my view model, it only recognises the ID but not the list of my PlayerViewModel..</p>
  
  <p>Here are my viewModels:</p>
  
  <pre><code>public class PlayerViewModel
  {
      public int ID { get; set; }
      public string Name { get; set; }
  }
  
  public class TeamViewModel
  {
      public int ID { get; set; }
      public List&lt;PlayerViewModel&gt; Players;
  }
  </code></pre>
  
  <p>This is my MVC-controller:</p>
  
  <pre><code>[HttpPost]
      public JsonResult IndexPost(int ID, List&lt;PlayerViewModel&gt; ListPlayers, TeamViewModel Team)
      {
          return Json(true, JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p>This is my Angular code:</p>
  
  <pre><code>$scope.players = [];
              $scope.playerA = { ID: 5, Name: "Player1" };
              $scope.playerB = { ID: 6, Name: "Player2" };
              $scope.playerC = { ID: 8, Name: "Player3" };
              $scope.players.push($scope.playerA);
              $scope.players.push($scope.playerB);
              $scope.players.push($scope.playerC);
  
              $scope.ID = 7;
  
              $scope.team = { ID: $scope.ID, Players: $scope.players };
  
              $scope.btnClick = function () {
                  $http({
                      traditional: true,
                      url: "IndexPost",
                      method: "POST",
                      data: { 'ID': $scope.ID, 'ListPlayers': $scope.players, 'Team': $scope.team },
                      dataType: FormData
                  }).success(function (data) {
                      $scope.finish = data;
                  }).error(function (data) {
                      $scope.status = status;
                  });
              }
  </code></pre>
  
  <p>This is my response in the controller:</p>
  
  <p><a href="https://www.dropbox.com/s/ufys0jrtigyy654/Screenshot%202014-10-27%2015.51.55.png?dl=0" rel="nofollow">(It's an image in dropbox)</a></p>
  
  <p>As you can see, the ID of my TeamViewModel is correct, but the List of PlayerViewModels won't fill in. Does anyone have an idea what i'm doing wrong? </p>
  
  <p>Thank you!!</p>