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

    Navigation component.

    Handles the application's top navigation bar. Provides login/logout functionality, user state awareness, and visual feedback when the user scrolls down the page.

    Selector: app-navigation Standalone: true

    Index

    Constructors

    Properties

    authService: AuthService = ...

    Injected authentication service for managing user session state.

    isScrolled: boolean = false

    Boolean flag indicating whether the page has been scrolled past a certain threshold (used for styling changes).

    router: Router = ...

    Angular Router instance for navigation control.

    user: Signal<User | null> = ...

    Computed signal representing the currently authenticated user. Updates reactively when the authentication state changes.

    Methods

    • Scroll listener that toggles the isScrolled state when the user scrolls.

      Parameters

      • event: Event

        The window scroll event.

      Returns void

      // Triggered automatically via the host listener
      onScroll(event: Event) {
      const currentScrollPos = window.scrollY;
      this.isScrolled = currentScrollPos > 50;
      }