angulartypescript

Is there a simple way to display a countdown to datetime in Angular?


I receive an object that is a DateTime, and I need to have a timer displayed on my component.

It is an expiration timer so on the timer hitting 0 I need to update the component.

I'm not sure how I should go about doing this, I cannot find any modules that do this.


Solution

  • You can use setInterval directive like this: setInterval(() => { this.loading = true; this.getSignals(); }, 60000);

    60000 its one minute.

    Good luck!