#Printing one specific element from string array in Typescript

7 messages · Page 1 of 1 (latest)

wanton wadi
#

This is an async operation.

  const url = await this.postService.uploadImage(file);

When you try to add the result to array and log it, that still hasn't returned.
You should get undefined here too:

  console.log(this.fileUrl) 
fiery pasture
#

I do not though

#

There I get the desired URL

#

So how do I resolve this issue?

wanton wadi
#

My bad. I opened the thread only in sidebar and totally misstook it.

#

Are you getting:
"0 undefined"
"1 undefined"
"2 undefined"
"3 undefined"
?

fiery pasture
#

yes