I have a directive ct-steps-tooltip on an element along with ng-repeat like so:
<div id='courseSteps'
class='relative ease {{step.action.toLowerCase()}}'
ng-repeat='step in currentItem.userData.steps | filter:{action: filterSteps} track by $index'
ng-class='{"completed": step.endDate, "pointer": step.action==="Submit" && !step.endDate}'
ng-click='getRelated(step, $index)'
ct-steps-tooltip
ct-step-name="step.stepName"
ct-step-description="step.description"
ct-action="step.action"
ct-value-text="step.valueText"
ct-quantity='steps.length'
ct-completed='currentItem.steps.completedSteps'
ct-start-date='step.startDate'
ct-end-date='step.endDate'>
<div ng-show='step.endDate' class="stepCompleteCheck absolute"></div>
<div> {{ step.stepName }} </div>
</div>
My goal was to get the directive to re-bind/get called again whenever currentItem.userData.steps changed (I am actually completely clearing currentItem and then reassigning it). This actually works great in this simplified fiddle I made. In the fiddle you can clearly see "I got called!" in the console every time the data is changed. For some reason, the ct-steps-tooltip directive in the real code only gets called the first time, and doesn't get called again when the data changes (I have a similar "I got called" message in the real directive's link function). What am I doing in the real code that has broken this functionality?
EDIT: Noticing that OCCASIONALLY the directive IS called again on data change. Its happening like 10% of the time. My question is now seeming similar to this one.
$scope.currentItem = newItem;pretty much how I do it in the fiddle.