Refresh data on a page?

Hi, I’m a beginner, and i try to do an app with a shopping cart.
So i write a litlle function to delete the items of the cart. But i need to switch page to see the change.

Why ?

Thanks !

(and sorry for bad english :slight_smile: )

This is potentially a much more complex question than it probably seems. Would it be possible for you to provide a publicly-accessible repo (for example on GitHub) that would allow others to reproduce your situation?

What’s wrong with the ionic noobs and shopping carts? I am also a beginner and make an online store app.
As for your question, search for examples with the Storage module.

I think Storage is a bad choice here, because the question concerns state communication within a single app run. Using Storage for that exposes one to lots of needless concern over synchronization (and the associated performance hit).

I will upload the code on Github Thanks for the fast anwser !

this is the github with just the files of the cart page if you need other files tell me pleas

items.splice(index, 1);

items here appears to be a lexically-scoped variable, so the template can’t see it. Might you want to be splicing out of this.selectedItems instead?

1 Like