Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. addItems(data){
  2. totalItems.push(data);
  3. console.log(JSON.stringify(totalItems));
  4.  
  5. var price = 0;
  6. for(var i = 0; i < totalItems.length; i++){
  7. price += parseInt(totalItems[i].price);
  8. }
  9.  
  10. this.totalprice = price;
  11. console.log("Total Price = " + this.totalprice);
  12. console.log("Price = " + price);
  13.  
  14. // this.calculateCartPrice()
  15. //this.watch.calculateCartPrice()
  16.  
  17.  
  18. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement