javascript - IF and ELSE IF executable same time Angularjs -


    $scope.closeok = function (e) {              var xa = 0;              if ($rootscope.viewimage==0&&$rootscope.opencaidat==1&&$rootscope.openthread==1&&xa==0) {                  $('#caidatkhixem').modal('hide');                  xa=1;                  $rootscope.opencaidat = 0;                  $scope.$digest();                  e.preventdefault();                  e.stoppropagation();                  return true;              } else if ($rootscope.viewimage==0&&$rootscope.opencaidat==0&&$rootscope.openthread==1&&xa==0) {                  $rootscope.classhienthibaiviet = "modal animated fadeoutrightbig";                  xa=1;                  $timeout(function () {                      $('#hienbaihome').modal('hide');                  }, 1000);                  $rootscope.taptoexit = 1;                  $rootscope.openthread = 0;                  $scope.$digest();                  e.preventdefault();                  e.stoppropagation();                  return true;              }      };

can explain me why 2 sections if , else if executable same time. want 1 of them executed.

please me. sorry english bad


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -