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 =预览 –