Issue
When clicking on a car brand, i need it to be displayed on the bottom, where it has the name of the person, and its favorite car, cliked above, but when i click on one, the car brand is repeated between all items of the ngfor.
stackblitz example of it: https://stackblitz.com/edit/angular-ivy-rjdhkh?devtoolsheight=33&file=src/app/app.component.html
Solution
Use a dictionary to hold the values for each person using their name as the key. See the edited stackblitz.
https://stackblitz.com/edit/angular-ivy-pachaq?file=src/app/app.component.ts
Answered By - bjlasc01
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.