The following script is retrieving two values from the database.
I am using forkJoin
for this purpose, which is a new approach for me. The reason behind utilizing this method is that there is a specific function that requires both values to be fetched before it can be executed:
this.complexWordIdentification(this.postIWant, this.theHardWords);
Since this code snippet is within the ngOnInit lifecycle hook, it gets triggered at the beginning, fulfilling my requirement of fetching special words and text data from the database and passing them through a function right off the bat. However, this function relies on having access to these two crucial values, namely:
this.theHardWords
and this.PostIWant
.
In the line Observable.forkJoin(
, notice that it fails to reach console.log('first');
. Can anyone point out what mistake I might be making? Thank you!
ngOnInit() {
// Code block omitted for brevity
}
If you have any queries or suggestions to help resolve this issue, please feel free to share. I admit that I am still learning in this field... Thanks!