snapjay / ngCart

Really simple shopping cart for AngularJS
http://ngcart.snapjay.com
380 stars 236 forks source link

Filter to change currency - how to make it work inside templates #66

Open Jesus82 opened 8 years ago

Jesus82 commented 8 years ago

I have built [this filter] in order to be able to switch currencies (http://jsfiddle.net/Joe82/nkr7zch7/)

I have it in my controller, and it works fine for my html, but it doesn't work for the data that is inside the ngCart templates (addtocart.html; cart.html; checkout.html; summary.html). The console gives the following error: selectedCurrency is undefined EDIT: The problem is more specifically that the ng-cart directive cannot access the scope outside of the directive that contains the currency symbols and exchange rates. I have tried it by using $rootscope but it doesn't work. Any idea how to achieve that? Thanks

jasontrk commented 7 years ago

Hi there, did you manage to change the currency within the cart in the end? I'm dabbling with ngcart and can't seem to get the default currency to change to £.