Take Todo sample app as example. I can now push value from input into tasks object. However, each time I refresh the page, they are cleared. Therefore, can anyone show me how to save the object as JSON file so that I can call it each time I open the app or refresh it.
Have you tried using
window.localStorage to persist your data on the device as described in the last part of the tutorial?
yes, I have tried it. But I read some articles saying that localStorage will be cleared if user clear all web cookies… so I would like to store and save them into an existing json file.
Is there any way to do this?