Run directive after AngularJS DOM is finished rendering

I have an object that I will receive from the API that will take a significant amount of time, I want my directive to wait until the data is received.

+3


source to share


1 answer


You can read ngIf . Now tell me what your data is stored in $scope.data

. If you have something like this

<div ng-if="data"></div>

      



This div will only be injected into the DOM when it $scope.data

exists, which means you can make it wait for data before it is injected into the DOM.

+3


source







All Articles