frandiox / OnsenUI-Todo-App

Onsen UI 2.0 To-Do sample application implemented in Vanilla JavaScript.
MIT License
100 stars 74 forks source link

Data does not persist beyond current browser tab #8

Closed humanitiesclinic closed 4 years ago

humanitiesclinic commented 4 years ago

When I quit the current tab, the tasks I added is gone. Is this how it should work, or am I missing something?

If that's how it should, can I use PouchDB to persist the data, and how can I do it? Any suggestions on what tutorials or resources I can follow?

Arome8240 commented 4 years ago

Were you able to get an idea on how to fix it?

frandiox commented 4 years ago

It is supposed to be gone after the tab is closed since this is just an example app to show UI components. If you want to persist them, you can modify the create task function (https://github.com/frandiox/OnsenUI-Todo-App/blob/master/js/services.js#L13) to save data in localStorage or DB. Then, instead of adding fixtures during initialization, create the tasks you saved previously (https://github.com/frandiox/OnsenUI-Todo-App/blob/master/js/app.js#L19).

Arome8240 commented 4 years ago

i tried using local storage it wouldn't store it as array can you please put me through? On Mon, Jul 27, 2020, 5:05 AM Fran Dios notifications@github.com wrote:

Closed #8 https://github.com/frandiox/OnsenUI-Todo-App/issues/8.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/frandiox/OnsenUI-Todo-App/issues/8#event-3587939659, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMU4ZSUGXLSNW6BZ2BRPQRLR5T4G5ANCNFSM4MCL4ZQQ .

Arome8240 commented 4 years ago

frand frand1 Here's a snapshot of what I did but it still doesn't seem to work