PrimeNg css not working

Viewed 6366

I can get <button pButton type="button" class="ui-button-danger"></button> but it won't style it. I've linked the primeng.min.css in my index.html. But I'm assuming my .angular-cli.json file is faulty since the style section is empty.

Edit: Console error says: Failed to load resource: the server responded with a status of 404 (Not Found) on the <link rel="stylesheet" type="text/css" href="/node_modules/primeng/resources/primeng.min.css" /> But I've double checked, its there.

1 Answers

You only want to have entries in styles.css like below

@import '../node_modules/primeng/resources/primeng.min.css';
@import '../node_modules/primeng/resources/themes/nova-light/theme.css';
@import '../node_modules/primeicons/primeicons.css';

And there is no entries required in the styles array of angular.json

Related