Why was I not able to access window or console in a javascript file without prefixing with .this? : <p>I was working in a javascript file where I was unable to use <code>window</code> or <code>console</code> to find out the value of variables. I had to write <code>this.window</code> or <code>this.console</code> instead.</p>

<p>What was going on here? I thought that window was always possible?</p>

<p>PS. This was within a function passed in angular.extend.</p>
