Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(error/$rootScope/inprog): improve understanding and diagnosis of the error #7719

Closed
wants to merge 3 commits into from

Conversation

petebacondarwin
Copy link
Contributor

This change improves the documentation related to "$digest/$apply already in progress" errors.
It describes common scenarios where this error occurs and shows a demonstration of debugging a situation where the error has occurred, including a runnable example.

See #5549

@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#7719)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@petebacondarwin
Copy link
Contributor Author

You can see the new error doc page in action here: http://ci.angularjs.org/job/angular.js-pete/570/artifact/build/docs/error/$rootScope/inprog

);
```

It is not possible to tell which from the stack trace, but we happen know in this case that it is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to know"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic thanks

@petebacondarwin petebacondarwin added this to the 1.3.0 milestone Jun 6, 2014
});
});
}
```

The controller constructor is always instantiated from within an $apply cycle, so if the third-party component called our callback synchronously, we'd be trying to enter the $apply again.
We expect that our callback will be call asynchronously, and so from outside Angular. Therefore, we
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: 'will be called'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@petebacondarwin
Copy link
Contributor Author

Closed by 4124a65

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants