I am working on an Angular application that starts with a login portal. I am using the following template for my login screen:
login.html
<form method="post" name="form" (ngSubmit)="f.form.valid && login()" #f="ngForm" novalidate>
<fieldset>
<p>
<label>Username</label>
<input type="text" placeholder="e.g. JohnDoe" [(ngModel)]="model.username" #username="ngModel"
name="username" required/>
</p>
<p [ngClass]="{ 'has-error': f.submitted && !password.valid }">
<label>Password</label>
<input type="password" placeholder="Password" name="password" [(ngModel)]="model.password"
#password="ngModel" required/>
</p>
<p>
<input type="submit" [disabled]="loading" class="btn" value="Login">
</p>
</fieldset>
</form>
Unfortunately, whenever a user is logged in, the password manager of Chrome does not ask to store the credentials. Password managers like Lastpass however do offer to store it. What could I improve to fix this?