[GH-ISSUE #649] How can I use this package with ion-select? #351

Closed
opened 2026-03-03 14:37:44 +03:00 by kerem · 1 comment
Owner

Originally created by @mbelnf1 on GitHub (Nov 23, 2019).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/649

I am currently struggling to find a solution ta add images to ion-select in ionic 4. I tried several methods and it failed to display the flags. Is there any way around this issue. Here is my code

page.html


 <ion-select #select1 [(ngModel)]="selectedCode">
                                      <ion-select-option *ngFor="let c of countries" value="{{c.flag}}{{c.code}}">{{c.flag}}{{c.name}}</ion-select-option>
                                    </ion-select>

page.ts

 @ViewChild('select1', {static: false}) select1: Select;
 countries: any = [
    {
      code: '+93',
      name: 'Afghanistan',
      flag: 'af'
    },
Originally created by @mbelnf1 on GitHub (Nov 23, 2019). Original GitHub issue: https://github.com/lipis/flag-icons/issues/649 I am currently struggling to find a solution ta add images to ion-select in ionic 4. I tried several methods and it failed to display the flags. Is there any way around this issue. Here is my code page.html ``` <ion-select #select1 [(ngModel)]="selectedCode"> <ion-select-option *ngFor="let c of countries" value="{{c.flag}}{{c.code}}">{{c.flag}}{{c.name}}</ion-select-option> </ion-select> ``` page.ts ``` @ViewChild('select1', {static: false}) select1: Select; countries: any = [ { code: '+93', name: 'Afghanistan', flag: 'af' }, ```
kerem closed this issue 2026-03-03 14:37:45 +03:00
Author
Owner

@lipis commented on GitHub (Jan 16, 2020):

Not sure :/

<!-- gh-comment-id:575267128 --> @lipis commented on GitHub (Jan 16, 2020): Not sure :/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#351
No description provided.