I have this code being generated somewhere else in the application
"PHcolour":"rgb(4, 31, 156)","Ctextcolour":"rgb(59, 214, 252)"
I'm getting the data fine (from the model), using the squiggly brackets {{CtextColour}}
I'm wanting to have a button on my page that could change the colour scheme of the site. I have this working for something else using ng-click
Now the issue i'm having is the css won't accept the {{}}
So the method i was trying to do it was like this
<style media="screen">
.custom { background-color: #fff; }
.custom h1 { color: {{Ctextcolour}}; }
.custom h2 { color: {{Ctextcolour}}; }
.custom h3 { color: {{Ctextcolour}}; }
.custom h4 { color: {{Ctextcolour}}; }
.custom h5 { color: {{Ctextcolour}}; }
.custom h6 { color: {{Ctextcolour}}; }
.custom p { color: {{Ctextcolour}}; }
.custom th { background-color: #c3cced; color: {{Ctextcolour}};}
.custom.panel-heading { background-image:-webkit-linear-gradient(top, #c3cced, #c3cced ) !important; color: {{Ctextcolour}} !important;}
</style>
Which did not work (and also turned the rest of my html code pink in my IDE (Atom)
I tried switching it over to this which removed the pink, But still didn't work!
<ng-style media="screen">
.custom { background-color: #fff; }
.custom h1 { color: {{Ctextcolour}}; }
.custom h2 { color: {{Ctextcolour}}; }
.custom h3 { color: {{Ctextcolour}}; }
.custom h4 { color: {{Ctextcolour}}; }
.custom h5 { color: {{Ctextcolour}}; }
.custom h6 { color: {{Ctextcolour}}; }
.custom p { color: {{Ctextcolour}}; }
.custom th { background-color: #c3cced; color: {{Ctextcolour}};}
.custom.panel-heading { background-image:-webkit-linear-gradient(top, #c3cced, #c3cced ) !important; color: {{Ctextcolour}} !important;}
</ng-style>
The html for the button is this:
<button type="button" class="btn btn-info" ng-click="colorScheme = 'custom'" ng-model="eventData.theme">Custom Theme
</button>
The inspect element shows nothing has been added to the button, There is also no javascript errors at all.
Thanks