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

时间:2021-11-09 18:31:06

I have to remove the image from the list in the conformation model click on the YES button but after 2nd time model is not open.In the element section after 2nd time click "

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

<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>

display :none" is apply tell me sir how to resolve this problem?

显示:无“是适用告诉我先生如何解决这个问题?

1 个解决方案

#1


0  

Try to open your modal by function using:

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

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

And inside your controller write below function:

在你的控制器内写下以下功能:

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

#1


0  

Try to open your modal by function using:

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

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

And inside your controller write below function:

在你的控制器内写下以下功能:

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