Created
October 13, 2023 17:36
-
-
Save sean-perkins/f6d8a2c56c465c7be962e974ab39bb78 to your computer and use it in GitHub Desktop.
Registering all icons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { IonContent, IonHeader, IonIcon, IonTitle, IonToolbar } from '@ionic/angular/standalone'; | |
import * as icons from 'ionicons/icons'; | |
import { addIcons } from 'ionicons'; | |
@Component({ | |
selector: 'app-home', | |
templateUrl: 'home.page.html', | |
styleUrls: ['home.page.scss'], | |
standalone: true, | |
imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonIcon], | |
}) | |
export class HomePage { | |
constructor() { | |
for (const iconName in icons) { | |
addIcons({ [iconName]: (icons as any)[iconName] }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment