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