Skip to content

Instantly share code, notes, and snippets.

@vades
Last active May 21, 2019 06:13
Show Gist options
  • Save vades/764e072b3e1d1901b1b5a8b504b6d4fa to your computer and use it in GitHub Desktop.
Save vades/764e072b3e1d1901b1b5a8b504b6d4fa to your computer and use it in GitHub Desktop.
Using timeout in Angular App

Using timeout in Angular App

You have to use ArrowFunction ()=>

export class YourComponent implements OnInit {

  ngOnInit() {
   setTimeout(()=> {
     console.log('Running timeout');
    }, 5000);
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment