Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 当第一次从按钮提交时,仅在单击两次后打开Modal_Html_Django_Bootstrap Modal - Fatal编程技术网

Html 当第一次从按钮提交时,仅在单击两次后打开Modal

Html 当第一次从按钮提交时,仅在单击两次后打开Modal,html,django,bootstrap-modal,Html,Django,Bootstrap Modal,我有一个模式弹出窗口可以从一个按钮点击打开。不幸的是,我只能在第一次在浏览器中提交时单击两次后才能看到弹出窗口。但一旦弹出窗口被打开和关闭,我就可以在下一次尝试时单击打开模式。如果我刷新浏览器,也会发生同样的情况。这看起来很奇怪。任何人都能解释,为什么?我有以下代码 按钮html: <div><button class="btn btn-danger btn-sm" ng-disabled="{{update_problem_description_disabled}}" ng

我有一个模式弹出窗口可以从一个按钮点击打开。不幸的是,我只能在第一次在浏览器中提交时单击两次后才能看到弹出窗口。但一旦弹出窗口被打开和关闭,我就可以在下一次尝试时单击打开模式。如果我刷新浏览器,也会发生同样的情况。这看起来很奇怪。任何人都能解释,为什么?我有以下代码

按钮html:

<div><button class="btn btn-danger btn-sm" ng-disabled="{{update_problem_description_disabled}}" ng-click="siverifyAddReviewModal()"><i class="glyphicon glyphicon-edit"></i> Edit Review </button>
    </div>

打开模式的代码在哪里?添加了模式功能。干杯。还有打开模态的元素的代码。打开模态的元素的代码-我不明白你在问什么!我已经在按钮html中给出了模态函数。(ng click)。啊,是的。尝试将其更改为
ng change
。从第二次开始还开着吗?
<div class="modal-header container-fluid">

   {% include "siverify_modal_header.html" %}
</div>
<form class="well form-horizontal" name="addReviewForm">
   {% csrf_token %}
   <div id="form-modal-body" class="modal-body">
      {% verbatim %}
      <table class="table" style="width:90%">
          <tr>
              <th><label>Review Title/Purpose*</label></th></br>
                {% endverbatim %}

              <td><input type="text" class="col-md-10" maxlength="256" ng-model="arform.revtitle" value="arform.revtitle"  required/></td>

              <!--<td><input type="text" class="col-md-10" maxlength="256" ng-init="'{{reviewtit}}'" ng-model="arform.revtitle"  > {{reviewtit}} </td>-->

          </tr>
<div class="modal-footer">
      <button type="submit" class="btn btn-primary"
              ng-disabled="addReviewForm.$invalid || rev_submit_disabled"
              ng-click="addReview(arform)">Save</button>
      <button type="button" ng-click="cancel()"
              class="btn btn-small btn-warning">Cancel</button>
   </div>
 </form>
$scope.siverifyAddReviewModal = function(wpts,mask,lyr,tech) {
        // function to open modal and link to Modal Controller

        $scope.addRevModal = function(wptSet) {
            context = $scope.get_problem_stmt_context(dtWorklist, context_getter);
            //console.log("dtw", dtWorklist);
            var modalInstance = $modal.open({
                backdrop: 'static',
                templateUrl: '{% url 'siverify_add_review' %}',
                controller: 'SiVerifyAddReviewController',
                resolve:{
                        r_header: function(){ return wptSet; },
                        context: function(){ return context; }
                }
            });
           modalInstance.result.then(function () {
                datatable_worklist.refresh();
                $log.info('Modal success');

                //console.log(msg);
                }, function () {
                    $log.info('Modal dismissed at: ' + new Date());
            });
        };
        //End:function to open modal and link to Modal Controller