gametimes:any;
ngOnInit(): void {
this.gamewinService.get_current_gameid_time().subscribe(response =>{
this.gametimes = response;
console.log(response);
});
console.log(this.gametimes) //Undefiend
}
I am getting response in 'this.gametimes' but not whenever I am trying to getting this outside the response function its showing undefined. So, How to access response outside the function?