mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-11 05:13:02 -05:00
14 lines
351 B
TypeScript
14 lines
351 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));
|
|
}
|