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

Allow scope.$eval even while a $digest is in progress. #1618

Closed
@inklesspen

Description

@inklesspen

I am integrating some jQuery functionality into my Angular app, which involves the use of jQuery callbacks. The docs indicate that callbacks executing outside of the context of a scope should use scope.$eval to make sure everything gets updated. This does indeed work. However, sometimes my callbacks are called immediately rather than later on, which means I get a "$digest already in progress" error.

I think I can work around this by wrapping all my callbacks in a setTimeout, but this seems inelegant. Perhaps there should be some way to let a callback which may or may not be executed outside a scope to wrap itself in the scope?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions