Select dropdown menu fetching data from rest-api

Hi there, i’m trying to create a dropdown menu that fetch data from WordPress rest-api? Does anybody tried something like that? Any advice?. Thanks in advance.

try this for calling your rest api

import { Http, RequestOptions, Headers } from '@angular/http';
data:any;


getData(){
    return new Promise<[any]>(resolve => {
      let headers = new Headers({ 'Content-Type': 'application/json' });
      let options = new RequestOptions({ headers: headers });
  
      this.http.get('yourapi', options)
        .subscribe(data => {
  
          if (data['status'] == 200) {
            this.data = JSON.parse(data['_body']);
            console.log(this.data);
            resolve(this.data);
          }
          else {
            this.data = [];
            resolve(this.data);
          }
  
  
        });
    });
  }

for your dropdow menu

<ion-select  [(ngModel)]="selectone">
      <ion-option *ngFor="let item of data;" value="{{item}}">{{item }} </ion-option>
</ion-select>

Thanks, i’ll give a try.