I'm creating a sort of a theme-picker. When you pick a theme in a select an example of the chosen theme is rendered. Instead of changing css class names I thought it would be better to change the style sheet.
I've got it working by using a link element instead and just changing the path to the css-files.
angularjs - unload a css file
Can you unload a css file again dynamically?
I use this to load the style sheet:
assetsService.loadCss("/themes/awesometheme/awesome.css");
Can I somehow do something like this?
assetsService.removeCss("/themes/notsoawesometheme/notsoawesometheme.css");
Hi Tom
Why do you need to remove it?
/Jan
Hey Jan
I'm creating a sort of a theme-picker. When you pick a theme in a select an example of the chosen theme is rendered. Instead of changing css class names I thought it would be better to change the style sheet.
I've got it working by using a link element instead and just changing the path to the css-files.
is working on a reply...