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.
# Open the Issues tabOpen DevTools. Click the Go to Issues button in the yellow warning bar. Alternatively, select Issues from the More tools menu. Once you're on the Issues tab, click the Reload page button if necessary.
You can find Angular DevTools in the Chrome Web Store and in Firefox Addons. After installing Angular DevTools, find the extension under the Angular tab in your browser DevTools. Lets you explore the components and directives in your application and preview or edit their state.
From the Chrome menu: Open the Chrome menu and go to “More Tools” > “Developer Tools.” Finally, you can right-click (Windows) or Ctrl-click (Mac) anything on a web page and select “Inspect Element” to open Developer Tools. The Developer Tools panel will open in whatever web page you're on.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With