DEV Community

Cover image for Install primeNG for jHipster
aeltayeb
aeltayeb

Posted on

Install primeNG for jHipster

Here's the steps used to install primeNG 10.0.7 lts for angular 10 in jhipster 6.10.5

Steps

  1. run npm i primeng-lts primeicons @angular/animations chartjs @angular/cdk --save
  2. add following lines into vendor.scss

    @import '~primeng-lts/resources/primeng.min.css';

    @import '~primeng-lts/resources/themes/nova/theme.css';

    @import '~primeicons/primeicons.css';

  3. import BrowserAnimationsModule to your app.module.ts

    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

    and add it to imports
    BrowserAnimationsModule,

  4. add import 'chartjs/chart.js'; to vendor.ts

  5. Now you can use it
    for example let's use card https://www.primefaces.org/primeng/v10-lts/#/card

    • import {CardModule} from 'primeng-lts/card'; in your module and then add CardModule, to imports:[]
    • add <p-card> Content </p-card> to your component's html

References

Discussion (0)