"How does PrimeNG use classes to display icons instead of HTML tags?

Discussão em 'Angular' iniciado por José Alvarado, Março 18, 2025.

  1. I was reading through the GitHub project and noticed that icons extend from a BaseIcon class, which in turn extends from a BaseComponent. From what I saw, you can use the selector, for example, <AngleUpIcon>, to display the SVG of that icon. However, I would like to understand how PrimeNG manages to display icons using classes, for example:
    <i class="pi pi-user" style="font-size: 2.5rem"></i>.

    Find a clear explanation of how PrimeNG achieves the functionality of displaying icons using classes instead of HTML tags, possibly through custom components or other mechanisms.

    Continue reading...

Compartilhe esta Página