For Angular PrimeNG setup, Angular 8 and PrimeNG 8 versions are used here.
Below are the list of commands to download and install PrimeNG 8.
Install Angular CDK
npm i @angular/cdk@8.2.3
where i is alias for install. you can use npm install packagename or just npm i packagename
Install Angular Material
npm i @angular/material@8.2.3
Install Font Awesome
npm i font-awesome
Install PrimeIcons
npm i primeicons@2.0.0
Install PrimeNG
npm i primeng@8.1.1
Install angular animations if it is not installed already
npm i @angular/animations@8.2.14
After installing the above packages, PrimeNG and related package styles should be imported in the angular.json file.
Open angular.json file and add the below css under styles
"styles": [
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/themes/nova-light/theme.css",
"node_modules/primeng/resources/primeng.min.css",
]
Now all the PrimeNG packages and CSS styles setup is done.
You can view the complete package.json file for the compatible versions here