I have a MyService that gets injected into Component and Component .
Is it possible to find out from which component MyService.myMethod () is called ?
@Injectable()
export class MyService {
public myMethod(): void {
console.log('called from component: ' + component);
}
}
source
share