I\'ve a component that takes function as input. I\'ve passed this function from parent.
Though the function is called, the function is not able to access the depende
You need to .bind(this) if you pass methods around:
.bind(this)
or
export class App { constructor(private service: CustomService) { } customVal(): string { return this.service.getVal(); } customValFn = this.customVal.bind(this); }
with