onSubmit(quantity, product_name, product_price){ const data = { quantity, product_name, product_price }; this.items.push(data); localStorage.setItem('items', this.items); }
On Sunday, July 12, 2020 at 11:40:50 PM UTC+7 maka...@gmail.com wrote: > The Items array actually needs to be saved to localStorage. How do I push > an array to localStorage? > > >> -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/a82227ef-d233-46dd-a051-5d462b2fa6bdn%40googlegroups.com.