Floating label, How to get a result in .ts?

Hello! I have a simple question but I can’t resolve it. I have a floating label in my .html like this:


                <ion-label floating>Password</ion-label>
                <ion-input type="password"></ion-input>

How can I get username and password in my .ts file?
Thanks in advance!

Best regards.

simple create a property (field) in your ts

then just bind it using the ngmodel directive

see this link