AngularJS directive for visually putting items in shopping cart. If you are adding more functionality to the directive, consider this a template to get you started.
Include angular-add-to-cart.js to your project, include in the module you want.
<button ng-add-to-cart source=".product-image" target=".shopping-cart">Add to basket</button>
The source image will float, scale and be put into shopping cart.
Look inside the demo folder.
- npm install
- npm start
Browse the example at http://0.0.0.0:8080
Please feel free to make a pull request or add an issue. This is a directive pulled out from a project I am currently working on, so it would be great to generalize it for wider use.