我正在研究它很长一段时间。 单击其中任何一个时,我有2个单选按钮
1)it should be checked
2)a modal should appear
它第一次工作得很好,但是第二次我选择了另一个按钮,它将不会被检查,但它在逻辑上被检查只是没有在屏幕上显示! 这是我的代码
<input type="radio" data-toggle="modal" data-target=".bs-example-modal-sm" ng-model="choice.tel" value="1" name="tel" > cell phone <br/>
<input type="radio" data-toggle="modal" data-target=".bs-example-modal-sm" ng-model="choice.tel" value="2" name="tel" > home phone <br/>
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-body">
<label>telephone (comma-separated)</label>
<input type="text" name="phone" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" >Save changes</button>
</div>
</div>
</div>
</div>