I am working on an enterprise Angular application, with Ruby PageObject for testing. The problem we are running into is that sometimes an $interval that we have kicks off the $digest leading to random failures. I am trying to write a Javscript command that the page object can execute to see if a $digest is running. To do this I came up with the following...
angular.element("#application").injector().get('$rootScope').$$phase
This seems to work, however, I wanted to create a plunker to demonstrate the issue, however, this plunker doesn't change from $digest. However when I add the following....
$timeout(function() {
console.log("phase is "+$scope.$root.$$phase);
})
I see it become null, so how can I show that in the UI?