Closed PaulGiletich closed 8 years ago
Or maybe safeApply should stop to use $$phase and similar hacks, which is discouraged (using non-official internal code), and should use $evalAsync instead...
Yes we can, but $evalAsync or $applyAsync would not perform as fast as $$phase checking
When $scope is destroyed, its $root sets to null and safeApply throws
Uncaught TypeError: Cannot read property '$$phase' of undefined.
My proposition is to dispose safeApply observable when $scope is '$$destroyed' as there is no much sense in updating destroyed scope