Hello,
I'm applying the following function in my AngularJS controller:
$scope.cancelChanges = function() {
$scope.name = $scope.namebackup;
$scope.$apply();
};
However, when I run $ apply (), it shows me the following error:
Error: [$rootScope:inprog] http://errors.angularjs.org/1.2.15/$rootScope/inprog?p0=%24apply
at Error (native)
at http://local/vendor/bower/angular/angular.min.js:6:450
at m (http://local/vendor/bower/angular/angular.min.js:101:443)
at h.$apply (http://local/vendor/bower/angular/angular.min.js:108:301)
Does anyone know what it can be?