Hi !
What is the interest of the # name in this example please ? <ion-input #inputPass>
Hi !
What is the interest of the # name in this example please ? <ion-input #inputPass>
may be it is used as ngModel for element.
@Quiesan That would make a variable representing your input that can be accessed in the template (Example: <some-component (tap)="inputPass.someMethod()">
), and you also can use it to see your component with ViewChild in your ts file:
@ViewChild('inputPass') myInput: TextInput;
private someMethod() {
this.myInput.someMethod();
}
You can see more about it here: https://angular.io/guide/template-syntax#ref-vars
Thank you very much !