I am trying to pass `Objects` into a modal. I have no idea how to pass an argument into a modal. So I am trying with this :

```
vm.viewGroupDetail = function(userDetails) {

    var scope = $scope.$new();
    scope.userDetails = userDetails;

    vm.modalInstance = $uibModal.open({
        animation: true,
        templateUrl: 'app/views/groups/group_details_modal.html',
        windowClass: 'd-modal',
        size: 'lg',
        scope: scope,
        resolve: {
            userDetails: function () {
                return $scope.userDetails;
            }
        }
    });

};

```

And this is my modal HTML:

```
<div class="modal-header portlet-title">
    <button type="button" class="close" aria-hidden="true" ng-click="$close()">&times;</button>
    <div class="caption font-dark">
        <span class="caption-subject bold uppercase"> Group Detail</span>
    </div>
</div>
<div class="modal-body">
     <div class="portlet light accordian-body inner-datatable" id="demo1">
          <div class="portlet-body custom-portlet">
            <table class="table table-striped table-bordered table-hover">
              <thead>
                <tr>
                  <th>Users </th>
                  <th> Designation </th>
                  <th> User Image </th>
                </tr>
              </thead>     
              <tbody>
              <tr ng-repeat="userdetail in userDetailsList">
                  <td> {{userdetail.fullName}}</td>
                  <td> {{userdetail.designation}} </td>
                  <td>  <div class="user-img-holder">{{userdetail.fullName}}</div></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
</div>
<div class="modal-footer col-center">
    <button type="button" class="btn btn-primary" ng-click="$close()">OK</button>
</div>

```

I want to use the object passed into the `ng-repeat` clause, so that I can display within a datatable, inside a modal form.

Right now, I am successfully popping a modal form, but can't get the objects.

What am I doing wrong?