Reputation: 818
I often use a variation of angular.element($0).scope()
as a way of debugging angular issues.
However since moving to a new computer Developer tools always returns Uncaught ReferenceError: angular is not defined
Angular itself is running fine and is not minified (in dev environment) and I've 'inspected' an element which is in the correct scope.
Upvotes: 6
Views: 4567
Reputation: 818
I've worked out the issue. In the screenshot below there is a dropdown currently selected as 'top', it was set to JSON Formatter (a plugin I have). So it was trying to run the command in the wrong scope.
Ignore the top error (failed to load), that's unrelated.
Upvotes: 10
Reputation: 133
Please try after clicking on an HTML element which is enclosed with an $scope.
Upvotes: 0