veloper / ko-js-examples

A few examples of Knockout.js in action.
4 stars 3 forks source link

knockout-3.4.0.js has an error when running the shop #2

Open rickyspires opened 8 years ago

rickyspires commented 8 years ago

Hello.

I like the look of you shop in knockout js.

I am trying to run it with the latest knockout-3.4.0.js but i get this error in my console

TypeError: $data.price(...).formatMoney is not a function with($context){with($data||{}){return{'foreach':function(){return products }}}}

any thoughts on what it might be ?

Thanks

veloper commented 8 years ago

You'll need to include this library for that method to be defined.

https://github.com/veloper/ko-js-examples/blob/master/app/assets/javascripts/libs/formatMoney.js