Directives inside md-virtual-repeat not updating the controller scope
http://codepen.io/anon/pen/JYZEPm
I am using a directive inside the virtual repeat container. The directive controller manipulate the data inside the controller and applies to the template. However, the controller is called only a few times and then the directive controller instead of calling it for every md-virtual-repeat item.
Update: As a work around, I am using a function in the template to get the data. http://codepen.io/anon/pen/rOKjwZ
If some could tell me if this is the right approach, it would be greatly appreciated.
This looks like intended behavior. I'm not sure exactly what you're expecting but it is intended that the virtual repeat recycles rather ran destroying and recreating elements (which is what ng-repeat does). As such, you'll need to do your work in a scope watcher rather than at startup if you want it to work properly in virtual-repeat.
@vigneshnrfs as I was looking at this too, I've forked your codepen to produce an implementation that does what @kseamon describes above. Hope this helps.
@mtlewis Thanks a lot.