What I want to achieve is simple, but I want to know how you would do it. I want a button to appear when writing inside an input, and when the input is empty, it will disappear.
<input type="password" placeholder="Contraseña"> <button>mostrar</button>
The truth is that I have to apply it to angular but even so, in any way that they can do it, it helps me to know it either with typescript or javascript, thanks in advance
Yes, it is simple. In the first instance you need to validate that the input value exists, we do that in the following way:
In javascript, you write the following:
First, we receive the input value with the input variable. Next, we get the button label. We validate if the input has something, if so, show the button, if not, hide the button.
I hope this helps you: