forked from snapjay/ngCart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a quantity dropdown as part of the Add to Cart directive
Add quantityMax attribute Quantity remains when an item is added to cart and can update cart as (requested in snapjay#11) ngCart.totalItems renamed to getTotalItems ngCart.totalUniqueItems renamed to getTotalUniqueItems
- Loading branch information
Showing
7 changed files
with
35 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"description": "Shopping Cart built for AngularJS", | ||
"keywords": ["AngularJS", "module", "directive", "shopping cart", "e-commerce", "cart", "basket", "shopping"], | ||
"authors": {"name":"Dan Shreim", "email":"[email protected]>", "homepage":"http://www.snapjay.com/"}, | ||
"version": "0.0.2-rc.3", | ||
"version": "0.0.3-rc.1", | ||
"homepage": "http://ngcart.snapjay.com", | ||
"license": "MIT", | ||
"main": "dist/ngCart.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
|
||
<div ng-hide="attrs.id"> | ||
<a class="btn btn-lg btn-primary" ng-disabled="true" ng-transclude></a> | ||
|
||
</div> | ||
<div ng-show="attrs.id"> | ||
<div ng-hide="inCart()"> | ||
<a class="btn btn-lg btn-primary" | ||
ng-click="ngCart.addItem(id, name, price, quantity, data)" | ||
<div> | ||
<span ng-show="quantityMax"> | ||
<select name="quantity" id="quantity" ng-model="q" | ||
ng-options=" v for v in qtyOpt"></select> | ||
</span> | ||
<a class="btn btn-sm btn-primary" | ||
ng-click="ngCart.addItem(id, name, price, q, data)" | ||
ng-transclude></a> | ||
</div> | ||
<div class="alert alert-info" ng-show="inCart()"> | ||
This item is in your cart | ||
This item is in your cart <a ng-click="ngCart.removeItemById(id)">Remove</a> | ||
</div> | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters