I am learning how to use angular\'s new http client module. I get the error Cannot read property \'data\' of undefined when I try to consume the rest api.
Here\'s my app.htm
Since you are making a asynchronous request, initially results will be undefined, use a safe navigation operator to check if the results exists and then access the data