Read more

Angular: Solving "$digest already in progress" error

Dominik Schöler
March 23, 2015Software engineer at makandra GmbH

TL;DR You shouldn't call $scope.$apply() or $scope.$digest() inside a function that can be invoked by Angular – e.g. in an ngClick.

Illustration book lover

Growing Rails Applications in Practice

Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love.

  • Introduce design conventions for controllers and user-facing models
  • Create a system for growth
  • Build applications to last
Read more Show archive.org snapshot

The linked Stackoverflow answer has a quick overview of techniques to apply changes to a scope. It also explains what might be wrong when you're getting the error $digest already in progress and gives some information that every Angular developer should know.

Posted by Dominik Schöler to makandra dev (2015-03-23 13:32)