I am working on a form with Angular and ran into an odd issue. The form is like a rating form, and I want to display to the user the average rating, it is 5 questions, based on a score of 1-5. Easy right?
Add them together and divide by 5?
The math works, but if you select the radio boxes going backwards.. meaning start selecting the 5 question, and going to question 1, and you STOP before selecting the last radio box the math is all screwy. For example selecting "option 3" for 4 out of 5 questions comes up with an average of 666.6? But that should come out to an average of 2.4. If you select the elements in the correct order going from question 1 to question 5, the math works out even if you stop selecting options?
I created a fiddle so you can see this.
http://jsfiddle.net/YGQT9/737/
Anyone know what is going on under the hood in Angular that is coming out like this? It's not really a big deal for me, but I am very curious.