nutritionix / nutrition-label

Create a FDA-style nutrition label with any nutrition data source (even the Nutritionix API - http://www.nutritionix.com/api)
http://www.nutritionix.com/
MIT License
176 stars 66 forks source link

Pass userFunctionNameOnQuantityChange user function by reference #52

Closed Yurko-Fedoriv closed 8 years ago

Yurko-Fedoriv commented 8 years ago

@majin22 using global scope is considered a bad practice in JavaScript and is no go in Angular, so I changed this function feature to be passed by reference instead of property name in global scope. This way it's more flexible and correct.

I leave updating min files and docs/examples up to you

majin22 commented 8 years ago

@Yurko-Fedoriv noted. i'll work on this asap

majin22 commented 8 years ago

@Yurko-Fedoriv I have updated the files on the repo and pushed a new release for bower. thanks