Is that possible to append CSS from a variable. for example
var myHtml = "<div>My example html</div>";
// in html i can do this
<div [innerHTML]="myHtml"></div>
But what if I have CSS stored in variable. like below:-
var myCss = ".exampleClass {margin: 0;width: 100%;}";
How can I add this css variable in my CSS file OR in HTML as a working css?
I'm using Angular 4+ but even JavaScript solution also appreciated.