admin管理员组文章数量:1310237
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',
},
},
}),
]
本文标签: angularPrimeNG v18 with non standalone styleStack Overflow
版权声明:本文标题:angular - PrimeNG v18+ with non- standalone style - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741843305a2400634.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论