snapjay / ngCart

Really simple shopping cart for AngularJS
http://ngcart.snapjay.com
380 stars 236 forks source link

Don't save to $windows remove all items in cart every time you refresh #85

Closed wizyoua closed 7 years ago

wizyoua commented 7 years ago

So this really isn't an issue but a suggestion just in case anybody wants to be able to add something to cart but not be allowed to save in browser whenever you refresh the page.

As of right now, if you add an item to the cart, NgCart does a cool thing where if the user opens another tab with the same application page/ refreshes that same page the items in your cart will still be there. But what if you want to have your Cart refresh each time someone loads your page, well I'll show you, super easy:

Open ngcart.js file

if the line # doesn't match your code since I've been working on the js file for other features just copy the top code and do a ctrl find

Thanks