【发布时间】:2014-10-19 01:36:39
【问题描述】:
我正在遍历一个学生列表,每一行都有学生姓名和学院以及一个按钮。单击按钮后,您会看到一个显示学生详细信息的模式对话框。由于某种原因,我无法获得正确的学生信息。该对话框仅显示第一个学生的信息。这是pluker
http://plnkr.co/edit/kXB7OZuyOz57qyVMIu8T?p=preview
<div class="table-responsive">
<table class="table table-striped">
<tr ng-repeat = "student in students">
<td>{{student.name}}</td>
<td>{{student.college}}</td>
<td>
<div class="modal-header">
<button type="button" class="btn btn-primary"
data-toggle="modal" data-target="#dialogTestDialog">Options</button>
</div>
<div class="modal fade" id="dialogTestDialog" tabindex="-1" role="dialog" aria-labelledby="executionOptionLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
Student : {{student.name}} <br/> Detail on Student
<div class="modal-body">
<p>{{student.age}}</p>
<p>{{student.address}}</p>
<p>{{student.race}}</p>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
【问题讨论】: