mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 05:43:03 -05:00
feat(injectionToken): create new challenge on injectionToken
This commit is contained in:
13
apps/angular/injection-token/src/app/timer.component.ts
Normal file
13
apps/angular/injection-token/src/app/timer.component.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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));
|
||||
}
|
||||
Reference in New Issue
Block a user