How to use Local Storage in Angular/JavaScript shopping Cart Example... Part 3

preview_player
Показать описание
Make your data persist by using Local Storage in JavaScript,

LocalStorage is stored as key-value pairs, but need to be string. Objects need to be converted to string. But tools are provided to us to simply do that.

This video is part of a Shopping Cart series where I show you the basics of using Local Storage
Рекомендации по теме
Комментарии
Автор

Bro ur video is the best on this subject area and thanks you for this

temiyeoluseun
Автор

Nice video but i want clarity on something, you changed the new behaviourSubject variable name from numOfItems to cartItems but you didnt go back to change it in your app.component.ts file....app.component.ts is still holding the formal name is really giving me issue here....my cart items number are not showing again

oladejimichael
Автор

Hi.thnx for tuto its very helpful
I got a problem here :" if (ls) this.cartItems.next(ls);" =>Property 'next' does not exist on type 'any[]'.
How can i fix it ?

bigsmoker