Skip to content

Migration Guide

Çağatay Çivici edited this page Jun 13, 2018 · 22 revisions

# 6.0

Major changes include the new TreeTable and PrimeIcons to replace font-awesome.

  • TreeTable is reimplemented from scratch and it is not backward compatible. Refer to the TreeTable on getting started with the new API. If you have worked with p-table before, it is almost identical.
  • utc property functionality is removed from Calendar component, instead to work with utc or other timezones, use onValueChange property to convert the provided date to your preferred timezone.
  • autoAlign property of Dialog is removed, visit the dynamic content section at dialog documentation for details.

PrimeIcons

PrimeNG components now internally use PrimeIcons library, the official icons suite from PrimeTek. Previous releases depend on font-awesome, with 6.0 there is no such dependency. Visit PrimeIcons documentation for more information.

PrimeIcons is available at npm, run the following command to download it to your project.

npm install primeicons --save

PrimeIcons use the pi pi-{icon} syntax such as pi pi-check. A standalone icon can be displayed using an element such as i or span.

<i class="pi pi-check"></i>
<i class="pi pi-times"></i>

Using an icon on a button is simple as;

<button pButton class="pi pi-check"></button>

Using Font-Awesome

Prior to 6.0, font-awesome icons were provided only with the icon name without the .fa addon such as;

<button pButton class="fa-check"></button>

In 6.0, add .fa prefix to keep continue using font-awesome.

<button pButton class="fa fa-check"></button>

This change also allows using any other icon library, you may also mix different libraries like PrimeIcons, FontAwesome and more.

Icons of Button and Menu components in your application need to be updated to include .fa prefix when migrating to 6.0.

Clone this wiki locally