adding scope.errorMessage to the view