<div *ngIf="error" class="alert alert-danger">{{ error }}</div>

<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">

  <label for="new-password">Change password</label>
  <input
    type="password" id="new-password" placeholder="New password"
    formControlName="new-password" [ngClass]="{ 'input-error': formErrors['new-password'] }"
  >
  <div *ngIf="formErrors['new-password']" class="form-error">
    {{ formErrors['new-password'] }}
  </div>

  <input
    type="password" id="new-confirmed-password" placeholder="Confirm new password"
    formControlName="new-confirmed-password"
  >

  <input type="submit" value="Change password" [disabled]="!form.valid">
</form>
