Pleaase Someone help me!

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

                <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>
                  <!--<div> *ngIf="isAdmin == 'true' || isCl == 'true'"</div>-->

            <ion-toolbar >

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


              <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-skeleton-text animated style="width: 50%"></ion-skeleton-text>
                        <ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
                        <ion-skeleton-text animated style="width: 30%"></ion-skeleton-text>
                <div [ngSwitch]="nbr">
                    <ion-list  *ngSwitchCase="'1'">
                    <ion-item-sliding *ngFor="let job of jobs">
                    <ion-item button [routerLink]="['/travail',]">
                      <ion-avatar slot="start">
                        <img [src]="job.picture">
                        {{ job.title }}
                        <p>{{ job.description }}</p>
                        <p>{{ job.createdAt | date: 'short' }}</p>
                                <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(">
                  <ion-icon slot="top" name="trash"></ion-icon>
                <ion-list *ngSwitchCase="'2'">
                        <p>Demandes Demandes Demandes Demandes Demandes Demandes Demandes </p>



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

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

      ngOnDestroy() {

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

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

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 a écrit :