hey ionic team. i need your help with LocalStorage and Storage in ionic 2. i have 3 pages,
-the first is a list of user, (UserPage)
-the second is this detail list of user and (UserDetailPage)
-the last is the favorite page where i can save the favorite use. (FavoritePage)
-
my code is looks like this for the first page :
loadData(){
// serviceData is from my provider
this.serviceData.load(‘data/myData.json’).then(data=>{
load.dismiss();
this.reponses=data;
});
}
// this function is for userDetailPage
goDetail(reponse){
this.nav.push(VeterinaireDetailPage,reponse)
}- for the second page
// i can get data with the navParams
this.params=params;
this.response=params.data;
// function to add to userDetail to favoritePage
/*
here is my problem. how can i add detail for one user with click event on a button, to the FavoritePage and save data with the LocalStorage or Storage in ionic2
*/
- for the second page
Thanks and Sorry for my english. need your help please