0

Is there a way to apply SASS stylesheets to an Angular 5 project conditionally.

For example, in my app.component.ts file I can set a variable theme = blue or theme = green and somehow tell Angular to use a different color scheme for the application?

I have been trying to figure out a way to do this for a long time. Does anyone have any ideas? Currently, I set the stylesheets in the Angular Cli config.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Marcus Horne
  • 363
  • 1
  • 5
  • 16
  • Possible duplicate of https://stackoverflow.com/questions/36531486/dynamic-styleurls-in-angular-2#39755547 – match Feb 08 '18 at 18:31
  • 1
    You could have a class toggled dynamically on your root component or body, and have scss themes defined based on that class – David Feb 08 '18 at 18:31

0 Answers0