how to use primeNG with ionic 3?


how to use primeNG with ionic 3?

I followed in the footsteps of the primeNG documentation, but it did not work.


install it as described on primeng. It works really nicely.
So people need more iinformation, what you have done step by step and what does not work as expected. As said, it works really nicely.

Best regards, anna-liebt


Hey Anna_Liebt, thanks!
I followed the documentation to use the primeNG, after doing the ionic integration step by step with primeng, the component appears, but the component style of primeNG does not appear.
Here’s how the component:

this error appears in the console:
Refused to apply style from ‘http://localhost:8100/node_modules/primeng/resources/themes/omega/theme.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Como aplicar o estilo do primeNG no ionic 3?


ahhhhh I see. You have a big square with a red border. Format the border transparent.

Ohh, I’m kidding. It seems that he can not find css for themes and components. In an older project, I used primeng, and I needed css for personal customiazing, I went to primeng github page, search for my needed css files and copied it into assets folder.
In app.css I added it like

@import '../assets/partialsass/primeng/primeng';
@import '../assets/partialsass/primeng/flick/theme';

Maybe you can search inside your nodes folder for missing css files. If they are not there, get it from github.

Best regards, anna-liebt


Thanks anna_liebt !!!