I am using the jquery kendo ui grid, and from this edit button I am trying to call the angular2 method. My setup is simple:
export class UserComponent implements OnInit {
constructor( @Inject(UserService) public userService: UserService, @Inject(FormBuilder) public fb: FormBuilder) {
...
}
edit():void{ }
onInit() {
$("#grid").kendoGrid({
....
click: function () {
});
}
}
This working code is the only problem. I can call the angular2 method by simply specifying
click:this.edit
or
click: function () {
UserComponent.prototype.edit()
});
but in both cases the method is not from the current instance. So in this case, I cannot use the http service or any local variable or methods inside edit
source
share