how do i get everything in the localstorage


#1

I want to be able to create a list of favorite items with localstorage, but the items come from an api, so I did:

addFavorite (id) {

this.http.get ('https://anime4ever.000webhostapp.com/api/anime/’+id) .subscribe ((anime) => {
this.anime = anime;
this.storage.set (id, JSON.stringify (this.anime));

})

}

but now I do not know how to list all the items, I was able to list only one. Help me