What is $apply and $digest in AngularJS?

Updated Apr 28, 2026

Short answer

$apply triggers a full digest cycle; $digest runs it locally.

Deep explanation

$apply is used when changes occur outside AngularJS (like setTimeout). It triggers a full digest cycle from root scope. $digest only runs on current scope and children.

Real-world example

Updating UI after external API or timeout callback.

Common mistakes

  • Calling $apply inside digest causing errors.

Follow-up questions

  • When use $apply?
  • Difference from $digest?

More AngularJS interview questions

View all →