0

Based on login I'll get the color code and I'm storing it in localstorage and getting it throughout application. But challenging thing is I've to replace the color code in sass file.

$Primary-color:#491e6a;
$Secondary-color:#e5673a;
$button-color:#eb0e4d;
$Black:#000;
$White:#fff;

Here the color code I get on login have to replace for $Primary-color for example if I get #ecaa0b I have to replace it with that old color and will apply to all css files.

Sudheesh Singanamalla
  • 2,283
  • 3
  • 19
  • 36
Sudhir MN
  • 125
  • 8

1 Answers1

0
$rootScope.schoolColor = localStorage.getItem("schoolColor");

and in html

<div  ng-style="{background: schoolColor}">
                        <h3>Latest Events</h3>
                    </div>
Sudhir MN
  • 125
  • 8