FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

jonkirathe/count-down-timer: This is an Angular timer that can be used with Angularv16 and above which supports standalone. · GitHub

Repository files navigation

@kirathe/count-down-timer

Simple, easy-to-use, countdown for angular

Usage

1. Install

npm install @kirathe/count-down-timer --save

import CountDownTimerComponent。

import { CountDownTimerComponent } from '@kirathe/count-down-timer';

@Component({
  selector: 'app-header',
  standalone: true,
  imports: [CommonModule, CountDownTimerComponent],
  template: `
      <count-down-timer [dDay]="date"></count-down-timer>
  `,
  styleUrls: ['./header.component.scss'],
})
export class HeaderComponent { date = new Date('2023-12-06 04:29:40'); }

2、Template

If you want to use the default template, you can use the following code:
<count-down-timer [dDay]="date"></count-down-timer>

If you want to customize the template, you can use the following code:
    <count-down-timer [countDownTimerTemplate]="timerTemplate" [dDay]="date">
        <ng-template
            #timerTemplate
            let-days="daysToDDay"
            let-hours="hoursToDDay"
            let-minutes="minutesToDDay"
            let-seconds="secondsToDDay">
            <label class="text-danger">
			Count Down To The Next Release: {{ days }}
              <a class="h6">Day(s) {{ hours }}: {{ minutes }}: {{ seconds }}</a>
			</label>
        </ng-template>
    </count-down-timer>

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

License

The MIT License (see the LICENSE file for the full text)

About

This is an Angular timer that can be used with Angularv16 and above which supports standalone.

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL