There are some cases where I have a $scope variable where $root is not set: it isn't set in root scopes, and is not guaranteed in non-isolate scopes more info here- http://stackoverflow.com/questions/22216441/what-is-the-difference-between-scope-root-and-rootscope). In these cases safeApply will fail to operate correctly due to this line: https://github.com/Reactive-Extensions/rx.angular.js/blob/master/src/safeApply.js#L14. I would like to see this line to be rewritten as: ``` ($scope.$$phase || ($scope.$root && $scope.$root.$$phase)) ? onNext(data) : $scope.$apply(function () { onNext(data); }); ``` or something similar so it would not fail incorrectly in these cases.
There are some cases where I have a $scope variable where $root is not set: it isn't set in root scopes, and is not guaranteed in non-isolate scopes more info here- http://stackoverflow.com/questions/22216441/what-is-the-difference-between-scope-root-and-rootscope).
In these cases safeApply will fail to operate correctly due to this line: https://github.com/Reactive-Extensions/rx.angular.js/blob/master/src/safeApply.js#L14. I would like to see this line to be rewritten as:
or something similar so it would not fail incorrectly in these cases.