I am working on creating a basic clock application using TypeScript and Angular2. My goal is to display the current time in the app.
The issue I am facing is that Angular2 does not recognize the Window.setInterval method, so I need to use the $interval(fn, delay, [count], [invokeApply], [Pass]) method instead.
However, I am unsure of how to access the '$' methods in TypeScript.
Here is my code snippet:
clockString:string = '00:00:010';
constructor()
{
// Need help here
}
Tick ()
{
this.clockString=Date.now().toString();
}
Thank you, Aria.