javascript - Bootstrap Model is closed everytime after click on the cancel icon in AngularJS? -


i have remove product list. product removed after click on cancel icon, model closes. using angularjs.

/**   * @summary: removeselectedproductfromalbum function, remove productkey album   * @param: event, index, productobject   * @return: na   * @description:   */   $scope.albumkey            = [];  $scope.albumobject         = [];  $scope.setalbumobject      = [];    $scope.removeselectedproductfromalbum = function(event, index, productobject) {      //get album object scope      $scope.setalbumobject = $scope.setalbumobject;      //process remove productkeyid in album.      var productkeyid = productobject.keyid;            if(productkeyid != undefined) {          if($scope.productskeyidlist != undefined && $scope.productskeyidlist != null) {              var index = $scope.productskeyidlist.indexof(productkeyid);              $scope.productskeyidlist.splice(index, 1);              updatedproductkeyarray = $scope.productskeyidlist;                            //calling updatearray inner function update sharedbuyerkeyidlist after remove keyid              updatearray();          }      }   }  //calling updatearray function update product after deleting data  function updatearray () {      var product_db_ref = firebase.database().ref('datastore/productsalbum');      // updating product key in album.      product_db_ref.child($scope.setalbumobject.key).update({          productkey : updatedproductkeyarray      });      cmn.shownotification("top","center","info","product removed");      //$(event.currenttarget).parents("#hideafterremove").hide("slow");  }	
<div style="overflow:auto; max-height:300px;" >  <div class="dashboard-prod-wrap decorcardd2"   style="width:342px;" 	ng-repeat="selleralbum in sellerselalbumproducts" ng-if="sellerselalbumproducts.length > 0">    <i class="fa fa-remove" style="font-size:14px; cursor:pointer;" title="remove"      ng-click="removeselectedproductfromalbum($event, $index, selleralbum)">    </i>  <div class="w3-row w3-padding-top ng-cloak">    <span class="pull-left color-d4 text-capitalize no-wrap dash-prod-name w3-small ng-cloak">      <span class="product-name" style='padding-right:3px;'>         {{selleralbum.categoriesdto.categoryname}}       </span>       &nbsp;      <span class="w3-text-teal ng-cloak">        <b>{{selleralbum.sellerproductdesignsdtos[0].designsname}}</b>      </span>      <span class="w3-text-teal ng-cloak" ng-if="selleralbum.designnumber != 'undefined'">         -<b>{{selleralbum.designnumber}}</b>      </span>      <small class="text-muted w3-left w3-price-tag ng-cloak">         <div class='list-icon-f'>          <i class="fa fa-inr" aria-hidden="true"></i>        </div>        <span ng-if="!selleralbum.inoffer">          <i class="fa fa-inr"></i>          {{selleralbum.fixedprice}}        </span>        <span ng-if="selleralbum.inoffer">          <i	class="fa fa-inr"></i>          <strike class="w3-text-red">{{selleralbum.fixedprice}}</strike>             <span class="w3-text-green">	              {{selleralbum.offerprice}}            </span>        </span>      </small>      <small class="text-muted w3-left w3-price-tag ng-cloak" ng-if="selleralbum.fixedprice == 0">         <div class='list-icon-f'>          <i class="fa fa-inr" aria-hidden="true"></i>        </div>        <span ng-if="!selleralbum.inoffer">          <i	class="fa fa-inr"></i>          {{selleralbum.maxprice}}         </span>        <span ng-if="selleralbum.inoffer">          <i	class="fa fa-inr"></i>          <strike class="w3-text-red">{{selleralbum.maxprice}}</strike>             <strong class="w3-text-green">              {{selleralbum.offerprice}}            </strong>        </span>        <small class="w3-small"> (<i class="fa fa-inr"></i>{{selleralbum.minprice}}          - <i class="fa fa-inr"></i>{{selleralbum.maxprice}})        </small>      </small>    </span>    <div class="pull-right ng-cloak" style="width:100%;margin-top:10px;">      <div class='owner-img'>        <img src="{{selleralbum.sellerdto.usertypedto.imageurl != 'null' ? selleralbum.sellerdto.usertypedto.imageurl : '/static/assets/img/image_placeholder.jpg'}}"          alt="avatar" class="w3-right w3-circle w3-margin-left">      </div>       <small class="text-uppercase w3-tiny text-muted text-right ng-cloak">        <b>{{selleralbum.sellerdto.personname}}</b>        <span  ng-repeat="address in selleralbum.sellerdto.usertypedto.usertypeaddressdtos"            ng-if="address.keyid === selleralbum.sellerdto.usertypedto.defaultaddresskeyid">           - <b>{{address.city}}</b>        </span><br>      </small>    </div>  </div>  <hr class="w3-clear margin0">  <div class="w3-row-padding w3-padding-top" style="margin: 0 -16px">    <!-- start:this display large product image -->    <div class="dashboard-prod-col-left w3-center">      <div class="text-center  w3-padding-8"        ng-init="setimageurllist[selleralbum.keyid] = selleralbum.sellerproductsetdto[0].setimageurllist">        <div ng-repeat="image in setimageurllist[selleralbum.keyid]"          ng-click="selleralbum.defaultimageurl = image.imageurl"          onclick="imgshadowarr(this);"          ng-init="selleralbum.defaultimageurl = setimageurllist[selleralbum.keyid][0].imageurl"          class="dashboard-prod-img-wrap {{selleralbum.defaultimageurl == image.imageurl ? 'w3-border-teal-orange' : ''}}">          <img src="{{image.imageurl}}" class="prod-img-xs cursor-pointer">        </div>        <div class="dashboard-prod-img-wrap"          ng-if="productimgslist[selleralbum.keyid].length < 1">          <img src="/static/assets/img/product_default.jpg"            class="prod-img-xs">        </div>      </div>    </div>    <!-- end:this display large product image -->    <div class="dashboard-prod-col-right w3-center hover-div">      <img src="{{selleralbum.sellerproductsetdto[0].setimageurllist[0].imageurl != null ? selleralbum.sellerproductsetdto[0].setimageurllist[0].imageurl :'/static/assets/img/product_default.jpg'}}"        class="cursor-pointer" style="max-height:200px;border:1px solid black;">      <br>    </div>  </div>  <div class="">    <div class="text-center pull-left ng-cloak list-by-a list-by-color">      <div class='list-icon'>        <i class="fa fa-th-large" aria-hidden="true"></i>      </div>      <ul class='margin0'>        <li class="prodcolorwrap" ng-repeat="productset in selleralbum.sellerproductsetdto track $index"           style="cursor:pointer; background-color:{{productset.colorcode}}"          ng-click="setimageurllist[productset.keyid] = selleralbum.setimageurllist;             productset.defaultimageurl = setimageurllist[productset.keyid][0].imageurl">        </li>      </ul>    </div>    <div class='w3-offer-tag' ng-if="selleralbum.inoffer">      <label>        <i class="fa fa-star w3-spin"></i>           offer      </label>    </div>  </div>  <br>  </div>

function remove icon , please sir how fix issue?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -