get componentRef by component Name angular code example Example: angular get name of component this.constructor.name