Ist es möglich, das Attribut eines HTML-Elements mit Code in Angular zu ändern? Ich habe eine Schaltfläche, die ich möchte, um das Typ-Attribut einer Eingabe von Passwort in Text zu ändern. Dies ist, was kam zuerst in den Sinn:Wie ändert man das Attribut eines Elements in Angular 2
Vorlage:
<input name="password" type="password" />
<button click="showPassword()">eye</button>
Komponente:
showPassword() : void
{
//how do I change the password input to text input. Is there a better way to do this?
}