Hello everyone,
In my project I have a simple counter in a button: when this button is clicked, the counter increments by 1. I need to permanently store this value, and now I’m using “storage.set” (retrieving it in another page with “storage.get”). But the storage works only on one sessione, because when I close and re-open the application, the counter starts again from zero. This is my code:
public counter = 0;
count(){
this.counter+=1;
this.storage.set('BadgeCount',this.counter);
});
}
So, the page reloads the public counter instead of using the value stored: how can I declare the variable and then use the one that is saved in the storage? Yes, is a silly and stupid question, but I’m new to the world of coding.
Thanks for your time!