2

Per the question, does restangular have some kind of switch that could be used to turn on synchronous way for sending requests? like

var jqxhr = $.ajax({
            url: $scope.baseURL,
            data: {
              name: $scope.name
            },
            type: "GET",
            dataType: "json",
            **async: false,**
          })
          .done(function(data, textStatus, jqXHR) {...})
          .fail(function(data, textStatus, jqXHR) {...}
);

Thanks a lot!

Even
  • 287
  • 2
  • 8
  • 21

1 Answers1

0

Restangular use $http from angular, and $http returns always promise

https://docs.angularjs.org/api/ng/service/$http

so every $http call is asynchronous , but anyways i dont get why you have motivation to make something "synchronous" inside angular.

Milos Mosovsky
  • 2,913
  • 1
  • 16
  • 18