Bonjour chers tous,

J'utilise Ionic/angular 11

J'affiche une liste de numéro d'abonnement et je souhaiterais en fonction d'un numéro d'abonnement sélectionné, afficher les informations en rapport avec ce numéro.
sélectionné.
Nom : liste_abonnment.png
Affichages : 808
Taille : 235,7 Ko

Ma démarche:

ma page html
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
      <ion-row *ngFor="let payLoad of PayloadData">
        <div *ngIf= "payLoad.STATUS !== '4'">
          //je récupère dans mon lien ahref le numéro d'abonnement
          <a routerLink="/details-abonnement/{{payLoad.SUBS_ID}}"><ion-col >{{payLoad.SUBS_ID}}</ion-col></a>
          <ion-col>{{payLoad.SOLDE }} FCFA</ion-col>
        </div>
        <ng-container *ngFor="let tag of payLoad.TAGS" size="auto">
          <div *ngIf="tag.STATUS === '1'">
            <ion-col>{{tag.TAG_ID}}</ion-col> 
          </div>
          <div *ngIf="tag.STATUS !== '1'">
            <del>{{tag.TAG_ID}} - </del>
          </div>
        </ng-container>
        </ion-row>

je voudrais dans ma page TS:
récupère ce numéro sélectionné et le mettre dans une requête pour interrogé une API, puis avec les résultats obtenu les afficher dans une page DetailsAbonnement.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
constructor(  
    private http: HttpClient,  
    public authService: AuthService,
    private nativeStorage: NativeStorage,
    public LocalServ: LocalService)
      {
        this.getHistorique()
      }
 
    ngOnInit() {
 
    }
 
 getHistorique() {
      le lien de mon API
      let url = "http://www.site.com/ipingea/?action=GST&customerID=" + {{payLoad.SUBS_ID}};
      console.log(url);
      this.http.get(url)
        .subscribe(
           async (res: any[]) => 
           {
            this.idty = res;
            console.log('affiche le tableau des historiques');
            console.log(this.idty);
            this.PayloadData = this.idty.PAYLOAD;
          },
 
           async (err: any[]) => {
            console.log(err);
         });
    }
je voudrais savoir si je m'y prend bien.

Salutations sincères