Open gregAnd opened 5 years ago
hi @gregAnd
the store
is not recommended for angular. Instead, just listen to the onUpdate / onAdd / onRemove (depending on what you have) event and save your items in there. When you load the component, get it from the place you store it back. Quite simple. Store is just unnecessary here
hi @smnbbrv
Thank you for your quick reply.
I will use the event list to save.
Would you have an example because the I do not see really sent yet and recover the localStorage.
If I use onEnd () to store the event in localStorage, how can I get it back if I refresh the page.
I thought I was using onUpdate () but it does not activate when reloading the page.
Sorry but there is a lot of information on this subject.
I would like to save my list with localStorage for that I use the method store and set (), when I reload the page even if the localStorage saves the good positions, on the screen display does not conform is restitutes the initial orde of the elements.
I am attaching an example
https://stackblitz.com/edit/sortable-localstorage
If you have a solution, I'm interested