{"id":22406699,"url":"https://github.com/xiaojundebug/ngx-countdown","last_synced_at":"2026-05-03T19:33:06.419Z","repository":{"id":38525866,"uuid":"269411464","full_name":"xiaojundebug/ngx-countdown","owner":"xiaojundebug","description":"An angular countdown component.","archived":false,"fork":false,"pushed_at":"2023-01-07T18:49:54.000Z","size":5236,"stargazers_count":1,"open_issues_count":24,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T04:38:04.202Z","etag":null,"topics":["angular","countdown","ng"],"latest_commit_sha":null,"homepage":"https://xiaojundebug.github.io/ngx-countdown/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaojundebug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-04T16:36:06.000Z","updated_at":"2023-07-31T10:00:45.000Z","dependencies_parsed_at":"2023-02-07T21:31:04.982Z","dependency_job_id":null,"html_url":"https://github.com/xiaojundebug/ngx-countdown","commit_stats":null,"previous_names":["xiaojun1994/ngx-countdown"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xiaojundebug/ngx-countdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaojundebug%2Fngx-countdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaojundebug%2Fngx-countdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaojundebug%2Fngx-countdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaojundebug%2Fngx-countdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaojundebug","download_url":"https://codeload.github.com/xiaojundebug/ngx-countdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaojundebug%2Fngx-countdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","countdown","ng"],"created_at":"2024-12-05T11:09:46.915Z","updated_at":"2026-05-03T19:33:06.390Z","avatar_url":"https://github.com/xiaojundebug.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NgxCountdown\n\nAn angular countdown component, inspired by [vant](https://github.com/youzan/vant).\n\n_development environment: angular 8.2.14_\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"travis\" src=\"https://travis-ci.org/xiaojun1994/ngx-countdown.svg?branch=master\"\u003e\n\u003c/p\u003e\n\n👉 [Demo](https://stackblitz.com/edit/ngx-countdown-demo)\n\n## Install\n\n```bash\nnpm i @ciri/ngx-countdown\n```\n\n## Quick Start\n\nAdd it to your module:\n\n```typescript\nimport { CountdownModule } from '@ciri/ngx-countdown'\n\n@NgModule({\n  // ...\n  imports: [\n    // ...\n    CountdownModule\n  ],\n})\n```\n\nAdd to view:\n\n```html\n\u003cngx-countdown [time]=\"86400000\"\u003e\u003c/ngx-countdown\u003e\n\u003cbr /\u003e\n\u003cngx-countdown [time]=\"60000\" format=\"ss\"\u003e\u003c/ngx-countdown\u003es\n```\n\n## Millisecond Render\n\n```html\n\u003cngx-countdown [time]=\"86400000\" [millisecond]=\"true\" format=\"HH:mm:ss SSS\"\u003e\u003c/ngx-countdown\u003e\n```\n\n## Manual Control\n\n```html\n\u003cngx-countdown\n  #counter\n  [time]=\"10000\"\n  format=\"HH:mm:ss:SSS\"\n  [millisecond]=\"true\"\n  [autoStart]=\"false\"\n\u003e\u003c/ngx-countdown\n\u003e\u0026nbsp;state: {{ counter.state }}\n\u003cbr /\u003e\n\u003cbutton (click)=\"counter.start()\"\u003estart\u003c/button\u003e\u0026nbsp;\n\u003cbutton (click)=\"counter.pause()\"\u003epause\u003c/button\u003e\u0026nbsp;\n\u003cbutton (click)=\"counter.reset()\"\u003ereset\u003c/button\u003e\n```\n\n## Custom Render\n\n```html\n\u003cngx-countdown [time]=\"86400000 * 2\" [render]=\"render\" format=\"HH:mm:ss:SSS\" [millisecond]=\"true\"\u003e\n  \u003cng-template #render let-data\u003e\n    \u003cspan style=\"font-size: 26px; color: royalblue\"\u003e{{ data.formattedTime }}\u003c/span\u003e\n    \u003cdiv style=\"display: flex\"\u003e\n      \u003cspan style=\"color: #D95140\"\u003e{{ data.fragments[0] }}\u003c/span\u003e:\n      \u003cspan style=\"color: #58A55C\"\u003e{{ data.fragments[1] }}\u003c/span\u003e:\n      \u003cspan style=\"color: #F2BE42\"\u003e{{ data.fragments[2] }}\u003c/span\u003e:\n      \u003cspan style=\"color: #5086EC\"\u003e{{ data.fragments[3] }}\u003c/span\u003e\n    \u003c/div\u003e\n    \u003cspan\u003eremain: {{ data.remain }}ms\u003c/span\u003e\n  \u003c/ng-template\u003e\n\u003c/ngx-countdown\u003e\n```\n\n## Inputs\n\n| Name        | Type             | Default  | Description                                               |\n| ----------- | ---------------- | -------- | --------------------------------------------------------- |\n| time        | number           | 60000    | Total time(milliseconds)                                  |\n| format      | string           | HH:mm:ss | Time format, see: [Available Formats](#available-formats) |\n| autoStart   | boolean          | true     | Whether to auto start count down                          |\n| millisecond | boolean          | false    | Whether to enable millisecond render                      |\n| render      | TemplateRef\u003cany\u003e | -        | Custom render                                             |\n\n## Outputs\n\n| Event  | Description                        | Return value |\n| ------ | ---------------------------------- | ------------ |\n| finish | Triggered when count down finished | -            |\n| tick   | Triggered when count down changed  | Remain time  |\n\n## Available Formats\n\n| Event | Description           |\n| ----- | --------------------- |\n| DD    | Day                   |\n| HH    | Hour                  |\n| mm    | Minute                |\n| ss    | Second                |\n| S     | Millisecond, 1-digit  |\n| SS    | Millisecond, 2-digits |\n| SSS   | Millisecond, 3-digits |\n\n## Public Api\n\n| Name  | Type     | Description                                          |\n| ----- | -------- | ---------------------------------------------------- |\n| state | number   | Current state: 0 = paused, 1 = playing, 2 = finished |\n| start | function | Start count down                                     |\n| pause | function | Pause count down                                     |\n| reset | function | Reset count down                                     |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaojundebug%2Fngx-countdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaojundebug%2Fngx-countdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaojundebug%2Fngx-countdown/lists"}