Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

62
Views
Checking if $timeout is pending

I've this $timeout set inside my script and its code was wrote like this:

        timeout = $timeout(function () {
                            
            scope.eventHandler.apply(this, arguments);                                              
            
        }, scope.ngDebounceOptions.time)
        timeout.then(function(){},function(){},function(){})

After setting the var timeout I got this result when I fire JSON.stringify(timeout):

{"$$state":{"status":0,"pending":[[{"promise":{"$$state":{"status":0}}},null,null,null]]},"$$timeoutId":210}

And I'got this result when when I fire JSON.stringify(timeout) after timeout time elapse:

{"$$state":{"status":1,"processScheduled":false},"$$timeoutId":86}

My question is: how to check if timeoout has status 0 or 1?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!