videoflix-frontend - v0.0.0
    Preparing search index...

    Error handling service.

    Provides a simple reactive interface for displaying and clearing temporary error and success messages across the application.

    Messages are automatically cleared after a short timeout.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    error: Signal<string> = ...

    Readonly signal exposing the current error message. Components can subscribe to this for reactive updates.

    Methods

    • Clears all error and success messages immediately.

      Useful for manual resets or before navigation.

      Returns void

    • Displays an error message to the user.

      Automatically clears the message after 3 seconds.

      Parameters

      • message: string

        The error message to display.

      Returns void

      this.errorService.showError('Invalid credentials');
      
    • Displays a success message to the user.

      Automatically clears both success and error messages after 3 seconds.

      Parameters

      • message: string

        The success message to display.

      Returns void

      this.errorService.showSuccess('Profile updated successfully');