Get $scope reference on $rootScope event handler-Collection of common programming errors
In the .run
section of the main module of my application, I have an event handler for the $locationChangeStart
event. I want to use this in order to confirm discarding unsaved changes. The problem is that I need a reference to the $scope
in order to perform these checks.
I tried adding that reference as I added the one for the $rootScope
, but I get an error Uncaught Error: Unknown provider: $scopeProvider
Originally posted 2013-12-02 01:34:54.