Just starting out with AngularJS and looking to implement a shopping cart using WebSQL. Wondering how to create functions for adding items to the cart and removing them.
Here's the code snippet I have so far:
angular.module('ecommerce').factory('CartService',
['$webSql', '$http', '$q', 'urls',
function ($webSql, $http, $q, urls) {
var factory = {
addToCart: addToCart,
removeCart: removeCart
};
return factory;
}
]);