How can I set focus to another input?

后端 未结 4 2029
天涯浪人
天涯浪人 2020-12-08 04:55

I need to be able to switch focus to an input element when some event occurs. How do I do that in Angular 2?

For example:



        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 05:07

    Actually you don't need to write any TS code for that (I'm using one of the other answer's example):

    
     
    

提交回复
热议问题