Skip to content

bug: Ionic v8 addIcon not working with composed name icons #1380

Open
@hbapps20

Description

@hbapps20

Current Behavior

I'm trying to use multiple ionic icons in my application, but only the simple ones are working for example: exit, calendar, add. If I try

it is not working.

Here are some examples:

html
<ion-footer> <ion-list> <ion-menu-toggle menu="m1"> <ion-item lines="none" (click)="onLogout()" button> <ion-icon name="exit" slot="start"></ion-icon> <ion-label>Salir</ion-label> </ion-item> </ion-menu-toggle> </ion-list> </ion-footer>

ts

import { ellipsisVerticalOutline, exit } from "ionicons/icons";
import { addIcons } from "ionicons";
export class AppComponent implements OnInit, OnDestroy {
...
constructor(
private platform: Platform,
//rivate splashScreen: SplashScreen,
//private statusBar: StatusBar,
private authService: AuthService,
private locationService: LocationService,
private router: Router,
private menuCtrl: MenuController,
private alertCtrl: AlertController,
//private messagingService: MessagingService,
// private translateService: TranslateService
) {
this.initializeApp();
addIcons({exit,ellipsisVerticalOutline});
}

}

image

If I change html for:
<ion-footer> <ion-list> <ion-menu-toggle menu="m1"> <ion-item lines="none" (click)="onLogout()" button> <ion-icon name="ellipsis-vertical-outline"></ion-icon> <ion-label>Salir</ion-label> </ion-item> </ion-menu-toggle> </ion-list> </ion-footer>

image

Not Working.

Expected Behavior

That the icon I'm using shows

Steps to Reproduce

Use some basic icons with no composed names like exit, calendar
Then use some icons like

Code Reproduction URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues that are suitable for a community contributor

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions