-
-
Notifications
You must be signed in to change notification settings - Fork 493
Description
The sliders work well in a regular div, but if I place the div within an ng-repeat div, the onChange event is not triggered. I have localized the error, and I do not believe it is related to the $index variable. If I replace the loop with 5 copies of the tag, referencing the items from 0 to 4, it works fine.
<div ng-repeat="choice in choices track by $index"> <div style="{{'height:' + (choices.length*1.5) + 'em;'}}"> <rzslider rz-slider-model="alignment[$index].utility" rz-slider-options="{id:qid+'_'+$index,floor:min,ceil:max,vertical:true,showTicksValues:true,onChange:$parent.slideChange}" > </rzslider> </div> <div class="clearfix"></div> <div class="rubric" ng-bind-html="choices[$index].n|space2Break"></div> </div>
(I cannot figure out how to get newlines and tabs to be visible in this markup.)
EDIT: Actually, I was wrong about working if I made separate copies. It appears to be a problem referencing and indexed array of values for the model.