So I\'ve been facing this weird issue but I\'m not sure if it\'s a bug or it\'s me missing something here.
So I have a component called TestComponent
and in
I just answered a related question here
To workaround mangling class names, you can create a function and check if it is equal to the class you want to test. In this case for TestComponent
, you could use this:
getType(o: any): string {
if (o === TestComponent)
return 'TestComponent';
}
And calling it will print the Component name:
console.log(getType(TestComponent)); // will print 'TestComponent'