<h1>Register</h1>
<div class="row mx-auto">
  <div class="col-xs-12 col-sm-10 col-md-8 col-sm-offset-1 col-md-offset-2 mx-auto">
    <form #f="ngForm" (ngSubmit)="register(f)">
      <div class="form-group">
        <label for="username">Username</label>
        <input 
        required
        type="username" 
        id="username"
        name="username" 
        ngModel
        class="form-control">
      </div>
      <div class="form-group">
        <label for="password">Password</label>
        <input
          required
          type="password"
          id="password"
          name="password"
          ngModel
          class="form-control">
      </div>
      <div class="form-group">
        <label for="repeatPassword">Repeat Password</label>
        <input
          required
          type="password"
          id="repeatPassword"
          name="repeatPassword"
          ngModel
          class="form-control">
      </div>
      <button class="btn btn-primary" [disabled]="f.invalid || f.value.repeatPassword!=f.value.password" type="submit">Register</button>
    </form>
  </div>
</div>