We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
7:3 error The "$watch" call should be assigned to a variable, in order to be destroyed during the $destroy event angular/on-watch
(function() { angular.module('app').run(run); run.$inject = ['$rootScope', '$location', '$http']; function run($rootScope, $location, $http) { var callback = $rootScope.$watch(function() { return $location.search(); }, function(newValue) { if (newValue.token) { $http.defaults.headers.common.token = newValue.token; } }); $rootScope.$on('$destroy', callback); } })();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
7:3 error The "$watch" call should be assigned to a variable, in order to be destroyed during the $destroy event angular/on-watch
The text was updated successfully, but these errors were encountered: