0
Good afternoon guys, I have a question and so far I have not found any solution, I need to pass a value from the database to the input on the login screen, but I did not find how to do this. My code responsible please the form is this one:
<form class="login-form auth-form" [formGroup]="formulario" (ngSubmit)="login()">
<ion-item>
<ion-label floating>Informe seu login</ion-label>
<ion-input type="text" formControlName="login" name='login'></ion-input>
</ion-item>
<show-hide-container>
<ion-item>
<ion-label floating>Informe sua senha</ion-label>
<ion-input type="password" formControlName="password" name='password' show-hide-input></ion-input>
</ion-item>
</show-hide-container>
<ion-item>
<ion-label>Lembrar login</ion-label>
<ion-checkbox color="primary" formControlName="remember" name="remember" checked='false'></ion-checkbox>
</ion-item>
<button ion-button block class="auth-action-button login-button" name="buttonSubmit" type="submit" [disabled]="!login.valido">Entrar</button>
</form>
The function I want to do to change the value of the field would be inside ngOnInit(),I already have the variable with the value but I can not insert this value inside the input "Login", I appreciate your help from now.
But what the problem is, it’s not just making Binding data into input?
– LeAndrade
Missed I figure out what action to do, searched by Binding date here and finally managed to do, thank you very much!
– gustavo.491