How do I call a function in a set Time interval in Angular 2. I want it to be called/Triggered at specific time intervals(for eg 10 secs). For Eg: ts File
nu
In your TS logic, define an observable based on an "interval", which will emit the values 0, 1, 2, 3, 4, 0, 1, ...
this.index = Observable.interval(10000).map(n => n % this.array.length);
In your component, unwrap that observable using async
and use it to index into the array.
{{array[index | async]}}