I am trying to setup a counter from a specific date using RxJS on an Angular 14 project, but the counter seems wrong. Milliseconds only change on the red spot, seconds are changing on the orange spot, but seconds should change at the blue spot, and milliseconds should countup on the orange and red spot combined. Am I correct?
What is my mistake in this code?
TS:
startTime = new Date("April 10, 2013 00:00:00").getTime();
elapsedTime = Date.now() - this.startTime;
count: Observable<number> | undefined;
this.count = interval()
.pipe(map(count => count + this.elapsedTime)
);
}
This is the placeholder:
{{ count | async }}
Thank you