#it doesn t pick up the image

31 messages ยท Page 1 of 1 (latest)

fathom gazelle
#

what im i doing wrong?

#

filepath seems correct and it makes the connection

fathom gazelle
#

๐Ÿ™ƒ

queen inlet
#

The browser downloads images from a web server, using the HTTP protocol. It doesn't show images from your hard drive.
Put the images your want to serve under the assets directory, and use the path /assets/the-image.jpg

fathom gazelle
#

doesn t seem to pick it up

queen inlet
#

Because you didn't do what my answer told you to do. Read it. Carefully.

fathom gazelle
#

jpg only works?

queen inlet
#

No, PNG is fine too.

fathom gazelle
queen inlet
#

My answer says: "use the path /assets/the-image.jpg". The paths you tried: ../Angularwebshow/src/... and ../assets/fiets.png. Does my path start with ..?

fathom gazelle
queen inlet
#

Post the code you tried then. as text.

fathom gazelle
#

/assets/fiets.png

queen inlet
#

You're using src="recipe.imagePath". So the source of the image is, literally, the path recipe.imagePath. To populate the src with an Angular expression, you must use [src]="recipe.imagePath".

fathom gazelle
queen inlet
#

Well, you thought incorrectly. If you don't use [], then the value is not, never, an Angular expression. If you do use [], then the value is, always, an Angular expression.

fathom gazelle
queen inlet
#

Do you have a URL to that course?

queen inlet
#

I can't access the part you're talking about.

fathom gazelle
queen inlet
#

It's a paying course. So unless the part you're talking about is freely accessible, a URL won't help me.

fathom gazelle