myFlix Angular Client Documentation - v0.0.0
    Preparing search index...

    Component representing the user login form.

    This component provides a form for users to log in with their credentials. Upon successful login, it stores the user data and token in local storage and navigates the user to the movie view.

    Implements

    • OnInit
    Index

    Constructors

    Properties

    dialogRef: MatDialogRef<UserLoginFormComponent>

    Reference to the dialog containing this component.

    fetchApiData: FetchApiDataService

    Service used to perform the user login API call.

    snackBar: MatSnackBar

    Service used to display notifications to the user.

    userData: { Password: string; Username: string } = ...

    Input object that stores user login credentials.

    Methods

    • Sends the user's credentials to the backend via the FetchApiDataService. If successful:

      1. Stores the user object and JWT token in localStorage.
      2. Closes the login dialog.
      3. Displays a success message via SnackBar.
      4. Navigates the user to the 'movies' route. If unsuccessful, displays an error message via SnackBar.

      Returns void