Struggling to secure user credentials in my Angular form due to 2-way data binding displaying encrypted values within the component. Here's the code snippet:
<form>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input class="form-control" placeholder="Username" [(ngModel)]="user.username"
[ngModelOptions]="{standalone: true}">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input class="form-control" type="password" placeholder="Password" [(ngModel)]="user.password"
[ngModelOptions]="{standalone: true}">
</div>
<br>
<button type="submit" class="btn btn-primary btn-lg btn-block" autofocus (click)="login(user)">
Login
</button>
</form>
User definition:
user = {
username: '',
password: ''
};
Hoping for a solution to avoid 2-way data binding pitfalls, any advice welcome.
Appreciate your help