![]() Just after my $evalAsync()ed function executed. Manipulations, and thus I have no guarantee my DOM tree won't be modified So if I get it correctly, my $evalAsync()ed code run before DOM And all widgets/directives use $watch to update DOM nodes. The $asyncEval is exactly what you want as the current DOM update hasĦ Konstantin Stepanov I looked through code and what I found out, $evalAsync just queuesĬode for execution, and then it's executed in $digest, but there in $digestįirst execution queue (filled with $evalAsync) is run, and then watchersĪre evaluated. Those animations need to be triggered from within directives, in which case Trying to solve? If you just want to apply special animations to do, then So in order for us to help you, what is the specific problem which you are Makes it hard to have clear line in a send as to where the DOM update Which can than modify the model which then causes more DOM updates. Since angular has concept of directives,Ī directive may unroll a loop, which can the instantiate a controller, ![]() Very clear where the beggining and end of render is. Rendered into a string which then gets innerHTML. The issue is that most frameworks have a string template which then gets If you enqueue from controller then it will be before, but if you enqueue Reply to this email directly or view it on GitHub: We'd prefer more robust and correct way to do it. LazyLoad (to load images in a lazy fashion), or run Facebook handlers (it'sĪ real problem for us, as Facebook XFBML parser requires already existingįb:* DOM nodes, which is difficult to guarantee with asynchronous DOMįor now we use $fer() here and there, but it's a very bad thing, Handlers binding, applying some jQuery plugins effects like Masonry, ![]() Guess after the end of digest cycle), so it's same to apply some specialĮffects to it, like drag-n-drop handling, fading in/out, custom event a lot of ng:repeat's and other ng:bind stuff is evaluated),Īnd as the result of these (potentially long) process DOM becomes stable (I if you really want to do after the browser renderĥ Konstantin Stepanov example: we load some partial with ng:view/, then this partial is I believe that is the time you want to attach the jquery plugins. The asyncEval is after the DOM construction but before the browser renders. ![]()
0 Comments
Leave a Reply. |