Skip to content

Instantly share code, notes, and snippets.

@shohey1226
Created November 9, 2013 06:23
Show Gist options
  • Save shohey1226/7382393 to your computer and use it in GitHub Desktop.
Save shohey1226/7382393 to your computer and use it in GitHub Desktop.
.factory('myOrder', function () {
var order = {};
return {
init: function () {
order = {};
},
setStock: function(stock){
order.stock = stock;
},
getStock: function(){
return order.stock;
},
setPurchasePrice: function(price){
order.purchasePrice = price;
},
getPurchasePrice: function(){
return order.purchasePrice;
},
setSharePrice: function(sharePrice){
order.sharePrice = sharePrice;
},
getOrder: function(){
return order;
},
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment