title: Call angular2 method from javascript function
body: <p>I am using jquery kendo ui grid and from that edit button i am trying to call angular2 method. My setup is simple:</p>
  
  <pre><code>export class UserComponent implements OnInit {
       constructor( @Inject(UserService) public userService: UserService,  @Inject(FormBuilder) public fb: FormBuilder) {
  ...
  }
  
  
   edit():void{ }
  
   onInit() {
     $("#grid").kendoGrid({
     ....
     click: function () {
       // Call angular2 method of the current instance
     });
  }
  }
  </code></pre>
  
  <p>It's working code the only issue is this. I can call the angular2 method by just stating</p>
  
  <pre><code> click:this.edit
  </code></pre>
  
  <p>or </p>
  
  <pre><code> click: function () {
           UserComponent.prototype.edit()
         });
  </code></pre>
  
  <p>but in both case the method is not from the current instance. So in this case i cannot make use of the http service or any local variable or methods inside edit</p>