I am in the process of developing a task management application and I am looking to implement a specific feature:
- Upon clicking 'Add Task', a new row is automatically added to the table (this part has been completed) and the input field within the latest table row becomes focused.
However, I do not want the input field to be automatically focused when the page loads; instead, I only want it to focus when a button with ng-click is clicked. Unfortunately, I am unsure of how to achieve this. Can anyone provide assistance? Would using $broadcast and $on functions be helpful in this scenario?
Thank you in advance for your help.