0
How do I make the data typed in a form input go to a variable or that is viewed by that variable, the variable in question is:
var emailAddress = "[email protected]";
The form in question is:
<form name="" class="list " id="">
<ion-list class=" " id="signup-list3">
<div class="app-icon"></div>
<label class="item item-input item-floating-label">
<span style="color: #9F9F9F;" class="input-label">E-mail</span>
<input style="color: #ffffff;" ng-model="user.email" type="email" placeholder="E-mail">
</label>
</ion-list>
<div style="width: 279px; height: 35px;" class="spacer"></div>
<button ng-click="firebase.auth();" class=" button button-balanced button-block icon-left ion-ios-email-outline " style="border-radius:0px 0px 0px 0px;" id="">Enviar e-mail de redefinição</button>
<button onclick="Mudarestado('item1', 'item2')" class="button button-balanced button-block icon-left ion-ios-email-outline ">Entrar</button>
</form>
I need the email typed in the input <input style="color: #ffffff;" ng-model="user.email" type="email" placeholder="E-mail">
is sent by clicking the button <button ng-click="firebase.auth();" class=" button button-balanced button-block icon-left ion-ios-email-outline " style="border-radius:0px 0px 0px 0px;" id="">Enviar e-mail de redefinição</button>
Fill input data and go to variable var emailAddress = "[email protected]";
thus allowing the function of the previously informed button to send the email to the user.
Basic mind the problem and I do not know how I can do so that the data typed in an input is in place of "[email protected]";
of the variable var emailAddress = "[email protected]";
for the rest of the script to send the email to the user who typed in the input.
Currently this script is configured to send the email already configured in this variable in the example [email protected] when the clik of the above mentioned button occurs.
Here follows the example of the doubt script
var auth = firebase.auth();
var emailAddress = "[email protected]";
auth.sendPasswordResetEmail(emailAddress).then(function() {
// Email sent.
}).catch(function(error) {
// An error happened.
});
How would I make this application in my code? could you give me an example?
– YH Software