I have a service that will make a call to my rest service every 2 minutes. On my service I have the following function
getNotifications(token: string) {
If you are using rxJs 6+, you can simlpy use interval method to do. like this -
import { interval } from 'rxjs'; interval(3000).subscribe(x => /* do something */)