Skip to content

Instantly share code, notes, and snippets.

@abo-elleef
Created March 27, 2013 04:45
Show Gist options
  • Save abo-elleef/5251706 to your computer and use it in GitHub Desktop.
Save abo-elleef/5251706 to your computer and use it in GitHub Desktop.
try to get around Error: $digest already in progress in my first angular js app with rails backend
in angular js app
After sending delete request to your backend server it will be redirected by default to the otherwise url that you define to in the app.js file
so if you try to redirect after delete request using
$location.path ("URL");
or
$scope.$apply($location.path("URL"));
or
$scope.$apply($location.path("URL"));
Error: $digest already in progress
will be raised
solution that i can find just for now:
remove otherwise form your routeprovider route
and use $location.path("url"); for redirect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment