Update to use preferred $scope.apply check
Merge pull request #1656 from TheBosZ/patch-1

Update to use preferred $scope.apply check