Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

load options for a specific value in ionic select

I have a question about ionic where i have been looking for during the past week but no one has got a decent explanation. Currently building an ionic app with reactive forms and i need to load values in a dropdown select field if they got a specific value.

 <select placeholder="upload bestanden" class="styled-select semi-square" [ngModelOptions]="{standalone: true}"
    name="media" [(ngModel)]="content.upload_id">
    <option *ngFor="let upload of uploads" [value]="upload.id">
      {{upload.name}}
    </option>
  </select>

this is the input field were talking about. the problem i got is that i want to only load the data which has an label_id of a set value, since i got multiple company's using this app but idk how to write that syntax.

typescript;

//get media
fileuploadProvider.all().subscribe(res => {
  this.uploads = res;
});

provider:

public all() {
return this.http.get<FileUploadRequest[]>("upload");
}

public get(id: number) {
return this.http.get<FileUploadRequest>("upload/" + id);}

public getLabel(label_id: number){
return this.http.get<FileUploadRequest[]>("upload/"+ label_id,);
}

as for the grammar nazi`s stop its not nice its rather annoying

Comments