Search | View Active Threads | View New Posts
Current Time: 11:51 AM

 

+ Reply to Thread
Results 1 to 3 of 3
  1. #1

    Thumbs up What is difference between $evalAsync and $timeout?

    $evalAsync - This executes the expression on the current scope on later time. The $evalAsync makes no guarantees as to when the expression will be executed, only that:

    1. If code is queued using $evalAsync from a directive, it will run after the DOM has been manipulated by Angular, but before the browser renders.
    2. If code is queued using $evalAsync from a controller, it will run before the DOM has been manipulated by Angular and before the browser renders.



    $timeout - This also executes the expression on the current scope on later time. When the code is queued using $timeout, it will run after the DOM has been manipulated by Angular and after the browser renders which may cause flicker in some cases.

  2. #2
    Join Date
    Sep 2018
    Posts
    152
    The $timeout() tells Angular that after the current cycle, there is a timeout waiting and this way it guarantees that there won't be collisions between cycles. To summarize both functions until now, $timeout is the safe way to execute the $apply() function.



    Astrologer in Ontario | Top indian astrologer in Mississauga | Best Astrologer in Edmonton | Astrology consultant in Edmonton

  3. #3

    MVNO Consulting

    If code is queued using $evalAsync from a directive, it should run after the DOM has been manipulated by Angular, but before the browser renders. If code is queued using $timeout, it should run after the DOM has been manipulated by Angular, and after the browser renders (which may cause flicker in some cases)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  

Sponsors

Domain Escrow Services
Above.com Domain Registrar, Marketplace and Revenue Optimizer
Trellian Direct Search Network

Industry Events

11-14 August 2019
Affiliate Summit East
New York, NY

4-6 March 2019
LeadsCon
Las Vegas

15-18 September 2018
MERGE 2018
Orlando, FL

Poll

How do you invest in domains?
to see the Poll results!
DomainState.com
Domain Tools | Domain Directory | Registrar Stats | Domain Glossary | Industry Events | FAQ | Members | Terms | RSS | Link To Us | Advertise | Contact Us
Other Related Trellian Services:
Above.com Registrar  |  Above.com Marketplace  |  Above.com Domain Manager  |  Free Search Toolbar  |  Free Webpage Builder  |  Keyword Research
Direct Search Navigation  |  Search Engine Submission and SEO Tools
Copyright © 2002 DomainState.com a Trellian Company 2014 Bronze Sponsor - Internet Commerce Association