In my constructor I'm making a call to my server through a simple service like so:
this.pointService.index().subscribe(x => this.points = x.map(y => Point.fromJson(y)));
But then in my ngOnInit
, in certain conditions, I need to use the value of this.points
. I'm not sure how to "wait" in the ngOnInit for that service to be done before I use the value.
I'm not asking how to get the value from an async operation. I'm simply saying that I need to know when the this.points
has a value so that another action in another method can know to run.