Is it possible there is an issue with the data subscription process? Upon subscribing to data from a service call, 'undefined' is returned as the data set.
Surprisingly, when I debug the code in the browser, it clearly shows that the correct data is being retrieved through the subscription. Below is an example of the code snippet. Any insights on what may be causing this discrepancy would be greatly appreciated.
this.userService.getUserTypes().subscribe(data => {
console.log('data length is ' + data.result.length);
});