Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call a javascript function when ng-repeat finishes

This is my first attempt at Angular so please bear with me.

I have a jQuery slider that usually is initialized at document ready. However this doesn't work when the images are being populated by angular since it will not have finished rendering the DOM.

Is there a way to detect when ng-repeat finished rendering the DOM so that I can call my function?

Thanks in advance

like image 405
Jonny Avatar asked Jun 30 '26 15:06

Jonny


1 Answers

Check out this answer Stack Overflow. Setting a timeout is never a good way to wait til something finishes. I would suggest a custom directive checking to see if you are scope.$last, then you can broadcast an event to the controller.

like image 78
Zack Argyle Avatar answered Jul 03 '26 04:07

Zack Argyle