We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

how to add reference to css files for built in themes

Answered
Devesh asked on July 24, 2019

Hi,
I am using fm-pivot in angular project. I have added flex-monster package as guided in documents. I am trying to change theme and for that I have used reference in index.html like:

<link type="text/css" href="/node_modules/flexmonster/theme/lightblue/flexmonster.min.css" />
But the changes are not reflecting.
Please help me what am I doing wrong here.

2 answers

Public
Vera Didenko Vera Didenko Flexmonster July 26, 2019

Hello,
 
Thank you for your question.
 
 
CSS and JS references are specified in the angular.json file, for example:

"styles": [ 
	"styles.css", 
	"/node_modules/flexmonster/flexmonster.min.css" 
],
"scripts": [ "/node_modules/flexmonster/flexmonster.full.js" ]

 
 
To switch to a different theme, simply respecify the corresponding path the following way:

"styles": [ 
	"styles.css", 
	"/node_modules/flexmonster/theme/dark/flexmonster.min.css" 
],
"scripts": [ "/node_modules/flexmonster/flexmonster.full.js" ]

More information can be found in our integration with Angular guide.
 
 
In case the respecified styles don't get applied, we kindly suggest re-opening and restarting the project. Afterward, the styles should come into effect.
 
 
Please let us know if this works fine for you.
 
 
Waiting for your response.
 
 
Best Regards,
Vera

Public
Devesh July 26, 2019

Thanks Vera!

Please login or Register to Submit Answer