Why do i have to call $scope.$digest() here?

Because the callback attached to the mouseenter event is outside of angular’s scope; angular has no idea when that function runs/ends so the digest cycle is never ran.

Calling $digest or $apply tells angular to update bindings and fire any watches.

Leave a Comment