Can I code a "finally" with AngularJS resource version 1.2.3?

Viewed 3553

I have the following code using AngularJS resource:

var entityResource = $resource('/api/:et/', {
                            et: $scope.entityType
                     });
entityResource.save(data,
   function (result) {
      // code
      $scope.modal.submitDisabled = false;
   }, function (result) {
      // code
      $scope.modal.submitDisabled = false;
   });

Is there something like a finally that I can use so I can put the code to disable (and my other code) outside of the success and error? Also can I now use .success and .error or do I still have to code as two functions inside () ?

I did notice changes in 1.2.3 but I am not sure if I understand how these apply.

1 Answers
Related