I need to upgrade the primeNG library to v19 on my angular project. My project is not configured to use standalone components - hence I don't have an app.config.ts file in my project. From what I understand in primeNG from v18 and on - the styles need to be provided in this file. Is there a way to use primeNG without this file?
I need to upgrade the primeNG library to v19 on my angular project. My project is not configured to use standalone components - hence I don't have an app.config.ts file in my project. From what I understand in primeNG from v18 and on - the styles need to be provided in this file. Is there a way to use primeNG without this file?
Share Improve this question asked Feb 2 at 15:19 more21more21 115 bronze badges 2- have you visited the documentation, please try it and change the question with the issue you face when implementing the documentation steps – Naren Murali Commented Feb 2 at 16:04
- the documentation says what I wrote in the question - that the styles need to be provided in the app.config.ts file, which I don't have – more21 Commented Feb 3 at 8:59
1 Answer
Reset to default 0@MoInMaRvZ answered this here
We can simply add the code directly in the app.module.ts
file.
Like this:
providers: [
provideHttpClient(withInterceptorsFromDi()),
provideAnimationsAsync(),
providePrimeNG({
theme: {
preset: Lara,
options: {
darkModeSelector: '.darkmode',
},
},
}),
]