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.

$evalAsync does not follow $eval semantics, runs on $rootScope, not current Scope #3548

Closed
@janv

Description

@janv

Since we have only a single asyncQueue (331cd5a), the call to $evalAsync does not follow the same semantics as the call to $eval.

This is because the scope for an expression in $evalAsync is always the $rootScope, whereas the scope for an $eval expression is always the current scope.

If this is intentional, which I hope it's not, it needs to carry a big fat warning in the docs. A fix could be to store the context alongside the actual expression when adding stuff to the asyncQueue.

I would just like to quickly get a confirmation on this oberservation before trying to submit a patch. I created a failing test to demonstrate the problem.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions