title: How to not refreshing a page using angularjs when call ajax success
body: <p>i am trying to Upload File From Angularjs to webapi 
  then finished upload my webpage is refresh</p>
  
  <p>This my Service</p>
  
  <pre><code>this.setImage = function(file , refModuleId , moduleTypeId)
  {
      var url = urlApiFileStorage + "api/FileStorage/SetImage";
      var deferred = $q.defer();
      var fd = new FormData();
      fd.append('file', file);
      fd.append('refModuleId', refModuleId);       
      fd.append('moduleType', moduleTypeId);
      $http({
          method: "POST",
          url : url,
          data : fd,
          async: false,
          crossDomain: true,
          headers : {
              'cache-control': 'no-cache',
              'Authorize' : sessionStorage['Authorize'],
              'Content-Type' : undefined
          }
      }).then(function(result) {
          deferred.resolve(result);
        }, function(result) {
          deferred.reject('ERROR');
        });
      return deferred.promise;
  };
  </code></pre>