0

i have used svg icons set in my angular project using(scss). now i want to change the icons color when ever user changes the theme "dark" icons should be light and when theme become light icons should be dark.

These things should be in single scss file, and i don want to use any angular material and No dependency.

James Z
  • 12,209
  • 10
  • 24
  • 44
Vishal
  • 1
  • 1
  • Possible duplicate of [Angular 2 Material Dynamic Themes](https://stackoverflow.com/questions/42786192/angular-2-material-dynamic-themes) – Intsab Haider Oct 24 '18 at 12:51

1 Answers1

0

If the icons you are using are svgs you can use a ngClass binding to switch the color attribute.

If not, you can use two different icons with some *ngIf on your theme boolean.

H. Gybels
  • 147
  • 1
  • 1
  • 11