I usually am against frameworks in general, except a strict few, angular has been forced upon me, let alone ionic. These “I do everything” framework are usually horrendous, and I did the error to let this one Ionic slips once more in my developement routine by suggestion of coworkers.
Another mistake that will cost me hours of hair pulling. How this forum is poorly build should have been a big enough red flag, but I’m stubborn and blind and tend to follow advices only to end up in despair.
Meh… let’s begin.
I literally generated a new ionic sidebar app, then a component with ionic generate page
command.
The angular template basically loops over an array of “pages” to build a side menu:
@for (p of appPages; track p; let i = $index) {
<ion-menu-toggle auto-hide="false">
<ion-item routerDirection="root" [routerLink]="[p.url]" lines="none" detail="false" routerLinkActive="selected">
<ion-icon aria-hidden="true" slot="start" [ios]="p.icon + '-outline'" [md]="p.icon + '-sharp'"></ion-icon>
<ion-label>{{ p.title }}</ion-label>
</ion-item>
</ion-menu-toggle>
}
defined in the main component:
public appPages = [
{ title: 'Chart Test', url: '/charttest', icon: 'bar-chart' },
{ title: 'Inbox', url: '/folder/inbox', icon: 'mail' },
{ title: 'Outbox', url: '/folder/outbox', icon: 'paper-plane' },
{ title: 'Favorites', url: '/folder/favorites', icon: 'heart' },
on which I added the “Chart test” route/menu.
I have then visited https://ionic.io/ionicons to see icon names (note that templates att -outline or -sharp to it) and found “bar-chart” to be the one I need.
SURPRISE SURPRISE!!!
Not a single damn icon shows!!!
On the forementioned site we have
<ion-icon name="bar-chart-sharp"></ion-icon>
<ion-icon name="bar-chart-outline"></ion-icon>
<ion-icon name="bar-chart"></ion-icon>
I also copied all the same ionic imports from the working pages (where icons show) on the new chart test component
Yes, I tried 3 different browser, even in incognito mode. Even on different machines.
Jesus… why I’m even writing this… this thing breaks at the most basic stuff… I don’t want to imagine what happens when I build a multi platform release