@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    A live countdown or elapsed-time display that ticks every second.

    In countdown mode it counts down to a target date/timestamp and emits expired when it reaches zero. In elapsed mode it counts up from the target date.

    <!-- Countdown to a specific date -->
    <ui-countdown [target]="launchDate" (expired)="onLaunch()" />

    <!-- Elapsed time since event -->
    <ui-countdown [target]="eventDate" mode="elapsed" format="hms" />

    Implements

    • OnInit
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    ariaLabel: InputSignal<string> = ...

    Accessible label for the timer region.

    expired: OutputEmitterRef<void> = ...

    Emitted once when the countdown reaches zero (countdown mode only).

    format: InputSignal<CountdownFormat> = ...

    Controls which units are displayed.

    • "dhms" — days / hours / minutes / seconds
    • "hms" — hours / minutes / seconds (days overflow into hours)
    • "ms" — minutes / seconds
    mode: InputSignal<CountdownMode> = ...

    "countdown" (default) counts down to target; "elapsed" counts up from target.

    target: InputSignal<number | Date> = ...

    Target date or Unix timestamp (ms).

    Methods

    • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

      Returns void