title: Correctly getting angular service object reference when a function is invoked using Window object
body: <p>I have a function exposed on window object. This is getting invoked from my Windows Application. </p>
  
  <pre><code>window.patchTransaction = this.AngularService.myMethod.bind(this);
  </code></pre>
  
  <p>In AngularService.js</p>
  
  <pre><code>myMethod(val) {
  window.alert(val); // argument i am passing from Windows appication
   window.alert(this); // undefined
  }
  </code></pre>
  
  <p>How can i get this reference of AngularService inside myMethod?</p>