Simple, easy and performance countdown for angular
-- Since there are no any countdown component on this page, Timer will automatically stop running. -
-Confirm this and you can observe it in Chrome-Profiles.
diff --git a/src/app/components/nothing.component.ts b/src/app/components/nothing.component.ts index e3197f1..14ec242 100644 --- a/src/app/components/nothing.component.ts +++ b/src/app/components/nothing.component.ts @@ -2,6 +2,7 @@ import { Component } from '@angular/core'; @Component({ selector: 'demo-nothing', - templateUrl: './nothing.component.html', + template: `Since there are no any countdown component on this page, Timer will automatically stop running.
+Confirm this and you can observe it in Chrome-Profiles.
`, }) export class NothingComponent {} diff --git a/src/app/components/notify.component.ts b/src/app/components/notify.component.ts index c3810b8..7890c5c 100644 --- a/src/app/components/notify.component.ts +++ b/src/app/components/notify.component.ts @@ -1,5 +1,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { CountdownConfig, CountdownEvent } from 'ngx-countdown'; +import { CountdownComponent, CountdownConfig, CountdownEvent } from 'ngx-countdown'; +import { ViewCodeComponent } from './view-code.component'; @Component({ selector: 'demo-notify', @@ -22,6 +23,8 @@ import { CountdownConfig, CountdownEvent } from 'ngx-countdown'; '[class.text-center]': `true`, }, changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CountdownComponent, ViewCodeComponent], }) export class NotifyComponent { config: CountdownConfig = { leftTime: 10, notify: [2, 5] }; diff --git a/src/app/components/only-seconds.component.ts b/src/app/components/only-seconds.component.ts index 6a65934..c29c29c 100644 --- a/src/app/components/only-seconds.component.ts +++ b/src/app/components/only-seconds.component.ts @@ -1,5 +1,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { CountdownConfig } from 'ngx-countdown'; +import { CountdownComponent, CountdownConfig } from 'ngx-countdown'; +import { ViewCodeComponent } from './view-code.component'; @Component({ selector: 'demo-only-seconds', @@ -17,6 +18,8 @@ import { CountdownConfig } from 'ngx-countdown'; '[class.text-center]': `true`, }, changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CountdownComponent, ViewCodeComponent], }) export class OnlySecondsComponent { config: CountdownConfig = { diff --git a/src/app/components/pretty-text.component.ts b/src/app/components/pretty-text.component.ts index 1698a6a..b7be8a7 100644 --- a/src/app/components/pretty-text.component.ts +++ b/src/app/components/pretty-text.component.ts @@ -1,5 +1,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { CountdownConfig } from 'ngx-countdown'; +import { CountdownComponent, CountdownConfig } from 'ngx-countdown'; +import { ViewCodeComponent } from './view-code.component'; @Component({ selector: 'demo-pretty-text', @@ -36,6 +37,8 @@ import { CountdownConfig } from 'ngx-countdown'; `, ], changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CountdownComponent, ViewCodeComponent], }) export class PrettyTextComponent { config: CountdownConfig = { diff --git a/src/app/components/test.component.ts b/src/app/components/test.component.ts index 1a44519..4befbde 100644 --- a/src/app/components/test.component.ts +++ b/src/app/components/test.component.ts @@ -1,9 +1,10 @@ import { Component } from '@angular/core'; +import { CountdownComponent } from 'ngx-countdown'; @Component({ selector: 'test', - template: ` -