I am trying to compare values coming from database to the value I am entering on my angular 2 model driven form. I want to display a div when the values are not equal. I am trying the logic below but I am unable to make it work. Help will be appreciated.

**View**

```
<form [formGroup]="reguserform" #f="ngForm" (ngSubmit)="register()">
<fieldset>
    <div class="form-group">
        <label for="Username">Username</label>
        <input class="form-control"
               [(ngModel)]="user.Username"
               type="text" id="Username"
               formControlName="Username" />
    </div>
    <div class="alert alert-danger"
         *ngIf="reguserform.controls.Username.touched && reguserform.controls.Username.errors">
        <div *ngIf="reguserform.controls.Username.errors.required"
             class="alert alert-danger">
            Please enter a valid Username...
        </div>
        <div *ngFor="let r of rusers">
            <div *ngIf="r.Username == user.Username" class="alert alert-danger">Username is taken</div>
        </div>
    </div>
</fieldset>

```

**Component**

```
getUsers() {
    this.authenticationService.getRegUser().subscribe(
        res => this.rusers = res
    );
}

```

Everything is fine from the db end the object is being logged in console too but at the time of comparison no div is shown.