text: .controller('QuizCtrl', function ($scope, $http) { 
      ...
  
      $scope.sendAnswer = function (option) {
          $scope.working = true;
          $scope.answered = true;
  
          $http.post('/api/trivia', { 'questionId': option.questionId, 'optionId': option.id }).success(function (data, status, headers, config) {
              $scope.correctAnswer = (data === true);
              $scope.working = false;
          }).error(function (data, status, headers, config) {
              $scope.title = "Oops... something went wrong";
              $scope.working = false;
          });
      };
  };