title: Angular .then() at the controller wrongly returns the same data from the a service
body: <p>I'm new to Angular and I'm using some of the features to post data to a endpoint - a endpoint that I have complete control over. Its a very simple endpoint with CRUD capability allowing me to work with "customer" entities for educational purposes.</p>
  
  <p>I have a partial view that basically lists all the customer. On each row, there is a delete button that allows me to delete that customer. When deleting a customer a request is sent to the endpoint. The endpoint will then check if a customer is "admin", if so, return a JSON response which says "You cannot delete a admin", otherwise, delete the customer and send back "Customer deleted" JSON response.</p>
  
  <p>Upon receiving a response from the server, the angular application should do logic depending on the response data. The endpoint is working as intended. However, I'm getting some strange/unexpected result.</p>
  
  <p>Here is what my code looks like:</p>
  
  <p>In a" SecretsController", I have the following: </p>
  
  <pre><code>   $scope.deleteUser = function (userName, $event) {
                      credentialsService.removeRegistredUser(userName).then(function (response) {
                          if (response.data.Feedback === "Error") {
                              $rootScope.currentStatus = "There was a error raised: " + response.data.Message;
                          } else {
                              $rootScope.currentStatus = "User sucessfully removed.";
                              var currentRow = $event.target.closest("tr");
                              $(currentRow).fadeOut(1500, function () {
                                  currentRow.remove();
                              });
                          };
                          fireResponseToGui();
                      }, function (error) {
                          $rootScope.currentStatus = "Invalid request: " + error.status + ". The response is: " + error.statusText;
                          fireResponseToGui();
                      });
                  };
  </code></pre>
  
  <p>And in :</p>
  
  <pre><code>             var deffered = $q.defer();
  
              var credentialsServiceFactory = {};
  
  credentialsServiceFactory.removeRegistredUser = function (userMail) {
                  $http.post(registratedUsersEndpoint + apiDelete + userMail + "&amp;token=" + token)
                      .then(function (response) {
                          deffered.resolve(response);
                      }, function (error) {
                          deffered.reject(error);
                      });
  
                  return deffered.promise;
              };
  </code></pre>
  
  <p>And there is the problem. After some checking with console.log(), the "return deffered.promise" line in the service seems to return the exact same result although the response object in the service is different. Anyone now what I'm doing wrong here?</p>