There are Basically two methods to perform that.
Try using observable which will suit best your requirement.
Method 1:
import {Observable} from 'Rxjs/rx';
import { Subscription } from "rxjs/Subscription";
// if you want your code to work everytime even though you leave the page
Observable.interval(1000).subscribe(()=>{
this.functionYouWantToCall();
});
Method 2:
// if you want your code to work only for this page
//define this before constructor
observableVar: Subscription;
this.observableVar = Observable.interval(1000).subscribe(()=>{
this.functionYouWantToCall();
});
ionViewDidLeave(){
this.observableVar.unsubscribe();
}
Method 3:
reLoad:any;
ngOnInit() {
this.reLoad = setInterval( ()=>{
console.log('*** Set Interval ***');
this.getOutletDetail();
},10000);
}
ngOnDestroy()
{
clearInterval(this.reLoad);
}