AngularJS how to alert the value of an object
3 answers
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 $log
.
$log.info(obj);
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.
0
source to share