Answer the question
In order to leave comments, you need to log in
How to access an element in ng2?
How to access an element (input) by id and call focus() when clicking on another button?
<button (click)="этотМетодДолженУстановитьФокусНаИнпут()">На эту кнопку надо нажать<button>
<form #formVar="ngForm" (ngSubmit)="методДляОбработкиМоейФормы(formVar.value)>
<input id="нужный-мне-инпут" type="text">
<input type="text">
<input type="text">
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question