0
我在AngularJS以下要求+ Bootstrap3 - 當觸發模式對話框需要複製當前錶行值傳遞給模態對話框輸入NG-點擊不工作的引導模式對話框
我代碼是在這裏 HTML:
<table class="table" data-sorting="true" data-paging="true" data-paging-size="10"
data-paging-position="right" data-paging-count-format="{CP} of {TP}">
<thead>
<tr>
<th data-breakpoints="xs" data-type="number">S.No</th>
<th>Name</th>
<th>Authorization</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="test in vm.testData">
<td>{{$index + 1}}</td>
<td>{{test.test}}</td>
<td>
<div ng-show="test.authorize">Authorized</div>
</td>
<td>
<button type="button" class="btn btn-primary" ng-click="vm.showEditDialog(test, $event)">
Edit
</button>
</td>
</tr>
</tbody>
</table>
<div class="modal fade" id="editTestModal" tabindex="-1" role="dialog" aria-labelledby="editTestLabel">
</div>
的JavaScript:
vm.showEditDialog = function (test, event) {
vm.selectedTest = angular.copy(test);
$("#editTestModal").modal('show');
};
您需要使用ui.bootstrap的$模式服務,信息提供https://angular-ui.github.io/bootstrap/,HTTPS://plnkr.co/edit/ p =預覽 –