mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-11 13:23:02 -05:00
16 lines
357 B
TypeScript
16 lines
357 B
TypeScript
import { Component } from '@angular/core';
|
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
import { interval } from 'rxjs';
|
|
import { DEFAULT_TIMER } from './data';
|
|
|
|
@Component({
|
|
selector: 'timer',
|
|
standalone: true,
|
|
template: `
|
|
Timer running {{ timer() }}
|
|
`,
|
|
})
|
|
export class TimerComponent {
|
|
timer = toSignal(interval(DEFAULT_TIMER));
|
|
}
|