How can I set focus on an input by (click) event? I have this function in place but I\'m clearly missing something (angular newbie here)
sTbState: string = \
try this :
in you HTML file:
Focus
in your ts File :
sTbState: string = 'invisible'; toggleSt(e, el) { this.sTbState = (this.sTbState === 'invisible' ? 'visible' : 'invisible'); if (this.sTbState === 'visible') { el.focus(); } }