title: Angularjs scope variable after $http call isn't updated in the view
body: <p>I have this in the service:  </p>
  
  <pre><code>UpdateQuestionsSmsStatus: function (smsProfileId, active) {
      //TODO: ajax get data
      var promise = this.UpdateQuestionsSmsStatusInternal(smsProfileId, active).then(function (response) {
          // The return value gets picked up by the then in the controller.
          return response;
      });
      // Return the promise to the controller
      return promise;
  },
  
  UpdateQuestionsSmsStatusInternal: function (smsProfileId, active) {
  
      return $http({ method: 'GET',
          url: '../QuestionManagement/UpdateQuestionsSmsStatus?smsProfileId=' + smsProfileId + '&amp;active=' + active
      }).
        success(function (data, status, headers, config) {
            // this callback will be called asynchronously
            // when the response is available
            response = data;
        }).
        error(function (data, status, headers, config) {
            // called asynchronously if an error occurs
            // or server returns response with an error status.
            if (window.console &amp;&amp; console.log) {
                console.log("Could not obtain questions received. Error:" + data + "Status:" + status + "Headers:" + headers + "Config:" + config);
            }
        });
  },
  </code></pre>
  
  <p>This in my controller:</p>
  
  <pre><code>$scope.updateQuestionsSmsStatus = function () {
      questionSelectionService.UpdateQuestionsSmsStatus($scope.smsProfile.Id, !$scope.smsProfile.Active).then(function (output) {
          $scope.smsProfile.Active = (output.data.result == "success") ? output.data.active : !output.data.active;
      });
  
  };
  </code></pre>
  
  <p>Which is called onclick from the view.
  And this in the view:</p>
  
  <pre><code>{{smsProfile.Active}}
  </code></pre>
  
  <p>The value in the view is never updated. Debugger doesn't show anything wrong, no errors appear.</p>
  
  <p>Does anyone have any ideas? Thank you.</p>