#it doesn t pick up the image
31 messages ยท Page 1 of 1 (latest)
๐
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
oh ok
doesn t seem to pick it up
Because you didn't do what my answer told you to do. Read it. Carefully.
jpg only works?
No, PNG is fine too.
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 ..?
tried that alr but didn t work
Post the code you tried then. as text.
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".
tought the could be used both?
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.
ok tha n the course is wrong they said it could be done both ways let me try ๐
Do you have a URL to that course?
I can't access the part you're talking about.
you want me to url the excact place?
It's a paying course. So unless the part you're talking about is freely accessible, a URL won't help me.
no it is paid :/ so can t acces