@alexmehler wrote:
hi,
i have an arry with subarrays:let xxx = [
{ country: "germany", cities: [ "berlin", "munich" ] }, { country: "germany", cities: [ "berlin", "munich" ] }
]
now i want to list only the cities in a list not the country … ngfor doesnt seem like a good fit for that
so my two options are :
- ditch ngfor and just populate the list with two nested for loops and create the ion-items on the fly with vanilla javascript
or
create anotehr array with the same two nested for loops and use that array for ngfor , but then it will be quite hard to get the actual array data on the original array for each list entry with a click listener , which is otherwise easy
if anyone got a better idea or an angular specific solution for this please share
Posts: 2
Participants: 2