The code is below
import {Component} from \'angular2/core\'; import {Observable} from \'rxjs/Rx\'; @Component({ selector: \'my-app\', template: \'Ticks (every s
If all you need is a timer, you could use this too:
setInterval(() => { this.callNecessaryMethod(); }, this.intervalInMilliSeconds);
This is the function prototype:
function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer (+2 overloads)