Quantcast
Channel: AngularJS : Prevent error $digest already in progress when calling $scope.$apply() - Stack Overflow
Viewing all articles
Browse latest Browse all 29

Answer by Shawn Dotey for AngularJS : Prevent error $digest already in progress when calling $scope.$apply()

$
0
0

similar to answers above but this has worked faithfully for me... in a service add:

    //sometimes you need to refresh scope, use this to prevent conflict
    this.applyAsNeeded = function (scope) {
        if (!scope.$$phase) {
            scope.$apply();
        }
    };

Viewing all articles
Browse latest Browse all 29

Latest Images

Trending Articles



Latest Images