I want to reference the keyword \"this\" in a typescript class in my Angular project. But it cannot be used. I always get the error that the variable I want to change is not
Instead of just referencing the function, you need to bind this to it: this.loggedIn.bind(this).
Only referencing the function ' strips ' it off the this reference it has when referencing. This is standard Javascript behavior.