I display a set of lines from a play and have audio that reads the lines one after another. I use ngRepeat to display the lines and am trying to use ngClass to highlight the line that is currently being spoken, keeping it in sync with the controller via isCurrent() function:
<div ng-repeat="line in lines" ng-class="{currentLine: isCurrent($index)}">
However, the style only gets applied when audio starts and stops because the ng-class expression does not get evaluated during playback. I suspect I need to use $watch but am unclear on where I would apply it.