Hi, Our project is using Angular as the UI side framework. We are trying to optimize the solution when the very first load of the screen and wish to bundle all the css into a single one. We notice that there is a DynamicResourcesHelper.ts to load some of the css, including primeng.datatable etc. Is there a way to bundle those as one? Thanks.
3 Answer(s)
-
0
Hi @MellowoodMedical
Those files are loaded dynamically according to selected UI theme. There are 12 different UI themes. If you want to use only one theme, you can delete other styles and add those style files into your angular.json file.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks. There is one more question, we want to change the theme base on the user roles. So there are two roles in the system and each of them will have their own theme. Any suggestions on how to implement that?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
1
Hi,
You can change the selected theme here https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/UiCustomization/UiThemeCustomizerFactory.cs#L26 according the role of current user.
There might be other places this setting is used. You can search for it in the solution.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)