No event handlers and listeners in GoJS are called binding this. They all can be JavaScript arrow functions, with whatever closed-over variables that you like.
I expect this to be the component that the method is part of, as is customary in Angular 2.
I have to set the class’ selectedData property, How can I solve this?
Do you understand the difference between anonymous functions and arrow functions in JavaScript? Specifically in the interpretation of this, which is lexically scoped in arrow functions, but which is bound by the caller in anonymous functions.
What is the code that you are trying? Show everything from the top of the file, but elide everything that is unrelated to the problem.