AngularJS how to alert the value of an object
If you are doing this for development purposes, just to see the contents of an object, it is much better to use the inspector in Chrome or Firebug in Firefox.
You can use a service for this
This gives you the advantage that you can now see the object as a tree and you can move around. In an alert, some objects may be larger than the alert box.
source to share