I'm working on passing a list to a view as a hidden type and retrieving those values using Angular.
for(int i = 0; i < Model.ListOfIds.Count;i++)
{
<input type="hidden" ng-model="model.ManagersId" value="@Model.ListOfIds[i]" />
// or
<input type="hidden" ng-model="model.ManagersId" ngvalue="@Model.ListOfIds[i]" />
// or
@Html.HiddenFor(m => m.ListOfIds[i], new { @ng_model="model.ManagersId"})
}
Within my Angular controller, I have the following:
$scope.GetValues= function () {
console.log($scope.model);
}
I am able to retrieve the values of all other fields except for the hidden type. When the function is called, the output resembles:
Object {Info: "A", Info: "B"}
Could someone assist me with this issue?