On the following Blitz, when trying to hit a blob storage API I get the following error in the console:
ERROR
Error: Cannot set property 'id' of undefined**
I suspect the error has to do where the way I'm writing the service, maybe I should use BehaviorSubject instead of an HTTPClient and then parse the xml as json object. Or maybe it has to do with the async call. The point is the icon gets created when this.fileservice.add()
is inside the ngOnInit function.
ngOnInit() {
this.getAzureFiles();
this.fileService.add({ Name: 'File 7', isFolder: false, parent: 'root' });
this.updateFileElementQuery();
}
so inside that function I'm just replacing it with the parsed response from azure, this should work. However it gives me the above error.
Basically I need the blob API to show as icons on my frontend.