I am trying to use setInterval in my Angular 4 app.
const inter = setInterval(() => { // logic resulting in exitCondition if(exitCondition) { clearInt
You can set like this,
this.interval = setInterval(() => { }, 1000);
and clear like this,
if (this.interval) { clearInterval(this.interval); }