Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger $digest loop when use finishCallback #273

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hjzheng
Copy link

@hjzheng hjzheng commented Aug 16, 2016

No description provided.

@@ -298,7 +298,11 @@ var timerModule = angular.module('timer', [])
$scope.millis = 0;
calculateTimeUnits();
if($scope.finishCallback) {
$scope.$eval($scope.finishCallback);
if ($rootScope.$$phase) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to avoid this undocumented API usage?

Copy link
Author

@hjzheng hjzheng Aug 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, As far as I know It is a only way to detect whether the $digest loop is running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants