Imagine a web page featuring a form that allows users to input multiple entries before submitting. As each entry is added, a summary of the data entered is displayed in a table at the top. Once all entries are completed, the user can then proceed to submit all the data as a whole. This means that multiple objects (such as myObj1, myObj2, and myObj3) would be submitted together.
var myObj1 = {
firstname: "Nic",
lastname: "Raboy",
website: "http://blog.nraboy.com"
}
var myObj2 = {
firstname: "Nic",
lastname: "Raboy",
website: "http://blog.nraboy.com"
}
var myObj3 = {
firstname: "Nic",
lastname: "Raboy",
website: "http://blog.nraboy.com"
}
The concept I'm exploring in Angular is how to post all this data at once from cached information saved by the user. Would using ngstorage be more effective than using local storage for this purpose? It's important to consider scenarios where there could be varying numbers of objects to push at once.
What are the pros and cons of ngstorage versus local storage, and which approach do you think would work best in this context?
Additionally, should these objects be stored individually or within an array of objects? Share your insights on what might be the most efficient approach.
Thank you for your input!