I have an SPA that retrieves potentially large amounts of data form elastic using an Angular http get and renders into a pane on the page. The problem I have is that I have some fancy scroll bars using jquery that dont work properly if the complete response from the http get hasn't been received before the jquery $(document).ready function is called. For smaller data sets, there is no issue, it's just larger data sets.
I've found a partial solution which is to introduce a setTimeout to the jquery $(document).ready function, however this is not very elegant and I don't want to always have a delay unless required.
Is there a way to call jquery $(document).ready from angular once I have received all of an http respose? Or is there another Angular function I could call?
document.readyis virtually useless in angular apps.... use directives to manage dom code$(document).readyhandler? Why do you need it? Also, beyond being just inelegant, asetTimeoutwill only sweep the problem under the rug and will not deterministically solve it. It will be a flaky solution that will let the issue reoccur the moment there are some unexpected lag or CPU spikes.