Using timeout in Angular App You have to use ArrowFunction ()=> export class YourComponent implements OnInit { ngOnInit() { setTimeout(()=> { console.log('Running timeout'); }, 5000); } }