migrated addToCart functionality to angularjs ctrl from jquery