-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Migration Guide
[](http://www.youtube.com/watch?v= W8lVy60wEOY "PrimeNG 10 Migration Guide")
PrimeNG 10 is the most important version in the history of the project. A new design system called PrimeOne is integrated, ChangeDetection strategy is changed to OnPush, PrimeIcons have been redesigned for 4.0, PrimeFlex CSS utilities have been updated with new helpers and more. As a result, although prior versions were a drop-in replacement, PrimeNG team has decided to include all major changes to V10 so that future versions can offer seamless updating experience.
- Migration to PrimeOne Design renames style classes, please see the PrimeOne Migration page for details.
- PrimeIcons 4.0 should be used with PrimeNG 10 themes, older versions of PrimeIcons are not supported as they are redesigned with new canvas sizes.
- Modal option removed from toast.
- primeng/primeng were deprecated in v5 and removed in v10.
- Grid CSS was deprecated in 2018 and removed in v10 in favor of PrimeFlex.
- Responsive options deprecated from components like Table in favor of custom implementations.
- Label of RadioButton and Checkbox is deprecated, provide your own label instead.
- MultiSelect defaultLabel is deprecated in favor of placeholder
- Slide Menu is deprecated
- Lightbox is deprecated in favor of Galleria
- Spinner is deprecated in favor of InputNumber
- p-header and p-footer are deprecated in favor or ng-template pTemplate="header or footer."
- Drop-in replacement.
- Drop-in replacement.
- Drop-in replacement.
- Schedule is updated to FullCalendar 4.0.0 as a result jQuery is no longer required for p-schedule.
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.
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.