0

I have a need to access whats in function scopeenter image description here

This is on console.log($window);

However I am not sure whats the best way to get to that. I am eventually trying to reach to Global: window object.

Thanks

This is not the copy of the question above. I have read that global veriable question. Issue is that I can not get to $windows.variable and I see that variable under Global: window so I got to get to that first. But I am not sure how since its in <function scope> and I dont think I can do something like 

$window.getAllEvents.<function scope> or something
Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221
  • Are you using Angular or Angular2? Can you elaborate on what you want to do with `$window!`? – Tim Biegeleisen Jun 28 '16 at 00:24
  • `$window` is reference to global `window` – charlietfl Jun 28 '16 at 00:27
  • I am using angularjs not angular2. I want to get some DOM data that has been in the DOM from non angular application. – Asim Zaidi Jun 28 '16 at 00:27
  • if I do $window.myDOMVariable it says undefined. but if I do console.log($window) I see it under Global.Window – Asim Zaidi Jun 28 '16 at 00:28
  • Possible duplicate of [How to access global js variable in AngularJS directive](http://stackoverflow.com/questions/19383725/how-to-access-global-js-variable-in-angularjs-directive) ... follow the example here – Tim Biegeleisen Jun 28 '16 at 00:28
  • I looked at that example and its not working for me...like I said I get undefind...I think I would have to loop or something – Asim Zaidi Jun 28 '16 at 00:30
  • This is not the copy of the question above. I have read that global veriable question. Issue is that I can not get to $windows.variable and I see that variable under Global: window so I got to get to that first. But I am not sure how since its in and I dont think I can do something like $window.getAllEvents. or something – Asim Zaidi Jun 28 '16 at 00:46

0 Answers0