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

    Login component.

    Handles user authentication, including:

    • Email/password login form
    • "Remember Me" functionality (localStorage)
    • Loading spinner and password visibility toggle
    • Navigation to main content after successful login

    Selector: app-login Standalone: true

    Index

    Constructors

    Properties

    authService: AuthService = ...

    Authentication service for handling user login requests.

    destroyRef: DestroyRef = ...

    Angular DestroyRef for registering cleanup logic (unsubscribe, etc.).

    isloading: WritableSignal<boolean> = ...

    Signal controlling the loading spinner state.

    rememberMe: boolean = false

    "Remember Me" checkbox value. When true, stores credentials in localStorage.

    rememberMeData: any = ...

    Data loaded from localStorage if the user previously enabled "Remember Me". Contains email and password if available.

    router: Router = ...

    Router instance used for post-login navigation.

    showPassword: WritableSignal<boolean> = ...

    Signal controlling password visibility (true = visible).

    Methods

    • Handles login form submission.

      Behavior:

      • Validates the form.
      • Sets the loading spinner.
      • Calls the authentication service with the provided credentials.
      • Stores credentials if "Remember Me" is enabled.
      • Navigates to /main-content on success.
      • Resets form after short delay.

      All subscriptions are cleaned up on component destroy.

      Parameters

      • formData: NgForm

        The NgForm instance representing the login form.

      Returns void

    • Toggles password visibility in the form.

      Parameters

      • field: string

        The form field name to toggle (expected: 'password').

      Returns void

      this.togglePasswordVisibility('password');