Tuesday, September 16, 2014

Angular.js debugging tip

Here is a quick debugging tip when you want to debug the scope for a specific element:

  • Open up your Angular.js application in Chrome
  • Use the selection tool(magnifying glass) to select the element you want to inspect
    • When the element is selected Chrome will store this element inside a ‘$0’ property
  • Now that we have an element reference, we can open up the console and write some code to get to the scope:

No comments: