I'm learning my Angular and attempting to develop a simple shopping cart.
I'd like to add NgCookies into my application to store the item in a cart.
Can someone advise how I add a object to a cookie?
I have the following function on my controller ...
this.addItemToBasket = function(item) {
//that.basket.push(item);
$cookies.put("shopping-cart", item,
{
});
alert($cookies.get("shopping-cart"));
},
If you need more information or code, please comment.