Hi,
I have a array list of items:
items = [
{id: '1', title: 'item 1'},
{id: '2', title: 'item 2'},
]
I want to add categories to this list and filter based on that, for example
-items
-- cat1
--- item 1
--- item 2
-- cat2
--- item 1
--- item 2
-- cat3
--- item 1
--- item 2
Also, how would I change the ngFor code to select the cat
<ion-list>
<ion-item *ngFor="let item of items" (click)="clicked($event, item)">
<h2>{{item.title}}</h2>
</ion-item>
</ion-list>
clicked (event, item){
console.log(item.title);
}