I am looping thought the the sqlite db with ionic storage using this code
ts
listKeys() {
this.storage.keys().then((k) => {
console.table(k);
this.loop = k;
console.log("key value", this.loop);
});
}
Here is what I get
I use this html to view my list
<ion-item-sliding *ngFor="let list of loop; index as i ">
<ion-item>
{{loop[i]}}
</ion-item>
<ion-item-options side="end">
<ion-item-option (click)="deleteKeyValue( loop[i] )" color="danger">
<ion-icon slot="icon-only" name="trash"></ion-icon>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
I wish to start the loop after Index 1. I have tried "index as i > 1 " and loop[ i > 1 ]. of course neither work. Any help would be greatly appreciated.
Use the SlicePipe https://angular.io/api/common/SlicePipe
<ion-item-sliding *ngFor="let list of loop | slice:2; index as i ">