第二次在AngularJs中没有打开bootstrap构造模型?

时间:2017-11-03 05:46:27

标签: angularjs bootstrap-modal

我必须从构象模型中的列表中删除图像,单击“是”按钮,但在第二次模型未打开后。在第二次单击后的元素部分中单击“#34”;



<span class="glyphicon glyphicon-remove-sign" data-toggle="modal" data-target="#openImage"></span>
<div id="openImage" class="modal in">
<div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <h4 class="modal-title">Are you sure???</h4>
    </div>
    <div class="modal-body">
      <p>Are you sure you want to delete this product?</p>
      <div class="row">
        <div class="col-12-xs text-center">
          <button class="btn btn-primary btn-md" ng-click="removeSelectedProductKey($event, productObject.keyId)"> Yes</button>
          <button class="btn btn-default btn-md"  data-dismiss="close">No</button>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
&#13;
&#13;
&#13;

显示:无&#34;申请告诉我先生如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

尝试使用以下函数打开模态:

 <span class="glyphicon glyphicon-remove-sign"  ng-click="openImg()"></span>

在你的控制器内写下以下函数:

function openImg(){
    angular.element('#openImage').modal();
}