As I understand from this question Global variables in AngularJS I have got basically 2 options for "global" variables:
- use a $rootScope http://docs.angularjs.org/api/ng.$rootScope
- use a service http://docs.angularjs.org/guide/services
So, for example, I have $rootScope.myVar
. How can I get it through the console? Like if myVar
is an object with some methods and I need to call one of its method.