In component :
singleEvent$: Observable;
On init, I get observable
this.singleEvent$ = this._eventService.even
You can use observable.pipe(take(1)).subscribe
to limit the observable to get only one value and stop listening for more.
let firstName: string;
this.insureFirstName
.pipe(take(1)) //this will limit the observable to only one value
.subscribe((firstName: string) => {
this.firstName = firstName; asssgning value
});
console.log(this.firstName); //accessing the value