Objects
을 모달로 전달하려고합니다. 나는 모달로 논쟁을 어떻게 전달할 지 모른다. 내부에, 나는 데이터 테이블 내에서 표시 할 수 있도록 내가는 ng-repeat
절에 전달 된 개체를 사용할개체 전달 및 모달 모달로 돌아 가기
<div class="modal-header portlet-title">
<button type="button" class="close" aria-hidden="true" ng-click="$close()">×</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>
:
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;
}
}
});
};
을 그리고 이것은 내 모달 HTML입니다 : 그래서 나는이 함께 노력하고 있습니다 모달 형식.
지금 모달 형식을 성공적으로 팝핑했지만 개체를 가져올 수 없습니다.
내가 뭘 잘못하고 있니?
나는 그것을 끝내었다. 그리고 그것을 위해 컨트롤러가 반드시 있어야 하는가? 그렇다면 예제 컨트롤러를 사용할 수 있습니까? 객체를 어떻게 사용합니까? 답장을 보내 주셔서 감사합니다. –
http://plnkr.co/edit/?p=preview – Grissom
죄송합니다, 미리보기는 도움이 되었습니까? –