Hide element on Select-option


#1

I have an ion-select, and want to hide a part of it when I select an option

      <ion-select interface="popover" [ngModel]="selectedUser._id" (ngModelChange)="selectUser($event)">
        <ion-option *ngFor="let user of users" [value]="user._id">{{ getUserNickname(user) }}
          <ion-content >
            <a *ngIf="user?.isConnected">Connected</a>
            <a *ngIf="!user?.isConnected">Disconnected</a>
          </ion-content>
        </ion-option>
      </ion-select>

I want to hide this when the option is selected


     <ion-content >
        <a *ngIf="user?.isConnected">Connected</a>
        <a *ngIf="!user?.isConnected">Disconnected</a>
      </ion-content>

#2

Why would users ever contain null or undefined in it?


#3

user.isConnected will contain true or false