Honestly I like  $scope.errorMessages = error.data.errors    a lot better.