Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Style inside ion option

$
0
0

@taiiieb wrote:

I have an ion select that display me a list of user, every user have a state = true / false,

I want to display beside the user name a cercle with css if true = green , if false red

I can"t achieve it

There’s my code

  <ion-select interface="popover" [ngModel]="selectedUser._id" (ngModelChange)="selectUser($event)">
    <ion-option *ngFor="let user of user" [value]="user._id">{{ getUserName(user) }}
        <span  [class]="selectedUser.isConnected === true ? 'dotOn' : 'dotOff'">{{user.isConnected}}</span>
    </ion-option>
  </ion-select>

I’m able to get the value of the state, but don’t know how to add a circle beside the name.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>