2

I got an object project which contains some properties and an array, when I try to loop trough it like this it's not working:

<img *ngFor="let image of {{project?.acf.images}}" src="{{image.image.url}}">

When I display it like this: {{project?.acf.images[0].image.url}}, it perfectly shows the url. Anything wrong with my syntax?

1 Answer 1

5

Interpolation is not needed in NgFor directive:

<img *ngFor="let image of project?.acf.images" src="{{image.image.url}}">
Sign up to request clarification or add additional context in comments.

1 Comment

Ah damm that was stupid haha, thanks mate! (will accept answer in 10 min, not allowed before then).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.