Pleaase Someone help me!

ion-segment doesn’t work , I want to be able to see list of jobs in segment “Traveaux”

              <ion-header>
                <ion-toolbar color="primary">
                  <ion-title > Travaux à réaliser </ion-title>

                <ion-button slot="end" routerLink="/travail"  mode="ios" >
                    <ion-icon slot="icon-only" name="add-circle"></ion-icon>
                  </ion-button>
                  <!--<div> *ngIf="isAdmin == 'true' || isCl == 'true'"</div>-->
                
                </ion-toolbar>
                
            </ion-header>

            <ion-toolbar >

              <ion-segment color="secondary" (ionChange)="segmentChanged($event)" >
                <ion-segment-button value="1" color="secondary" >
                  <ion-label>Traveaux</ion-label>
                </ion-segment-button>
                <ion-segment-button value="2" color="secondary">
                  <ion-label>Demandes</ion-label>
                </ion-segment-button>
              </ion-segment>


            </ion-toolbar>  



              <ion-content >
                  
                  <ion-list *ngIf="!jobs.length">
                      
                    <ion-item *ngFor="let item of [0, 1, 2]">
                    <ion-avatar slot="start">
                      <ion-skeleton-text animated></ion-skeleton-text>
                    </ion-avatar>
                    <ion-label>
                      <h3>
                        <ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
                      </h3>
                      <p>
                        <ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
                      </p>
                      <p>
                        <ion-skeleton-text animated style="width: 30%"></ion-skeleton-text>
                      </p>
                    </ion-label>
                  </ion-item>
                </ion-list>
                <div [ngSwitch]="nbr">
                    <ion-list  *ngSwitchCase="'1'">
                    <ion-item-sliding *ngFor="let job of jobs">
                    <ion-item button [routerLink]="['/travail', job.id]">
                      <ion-avatar slot="start">
                        <img [src]="job.picture">
                      </ion-avatar>
              
                      <ion-label>
                        {{ job.title }}
                        <p>{{ job.description }}</p>
                        <p>{{ job.createdAt | date: 'short' }}</p>
                      </ion-label>
              
                    </ion-item>
              
                    <!--
                                <ion-note color="primary" slot="end" *ngIf="product.price">{{ product.price | currency: 'BRL' }}</ion-note>
            -->
            <ion-item-options side="end">
                <ion-item-option color="danger" (click)="deleteJob(job.id)">
                  <ion-icon slot="top" name="trash"></ion-icon>
                  Supprimer
                </ion-item-option>
              </ion-item-options>
                  </ion-item-sliding>
                </ion-list>
                <ion-list *ngSwitchCase="'2'">
                    <ion-item>
                        <h4>Demandes</h4>
                        <p>Demandes Demandes Demandes Demandes Demandes Demandes Demandes </p>
                      </ion-item>

                  </ion-list>
                  </div>
              

              </ion-content>
         
 ___________________________________________

 @ViewChild(IonSegment) segment:IonSegment;
   nbr : string;

    ngOnInit() { 
    this.segment.value = '1';}

      ngOnDestroy() {
    this.jobsSubscription.unsubscribe();
        }

Not entirely sure but when I use segments I use a model e.g

 <ion-segment [(ngModel)]="mode">
        <ion-segment-button value="current">
          Current
        </ion-segment-button>
        <ion-segment-button value="history">
          History
        </ion-segment-button>
      </ion-segment>

and then

this.mode = "current"

in my component

so maybe you should try that?

Thank you it works , sir how can I put a condition next to *let job of jobs for example (status:“true”)and thank you

<ion-list *ngSwitchCase="‘current’" >

                <ion-item-sliding *ngFor="let job of jobs">

Le mer. 22 mai 2019 à 09:04, Richardshergold via Ionic Forum ionicframework@discoursemail.com a écrit :