I have an Angular application which loads a configuration .json
file. Essentially what I am trying to do is dynamically select components and add inline styles to the element.
config is given below as an example of the config structure fetched from a http request.
For example;
var config = [
{
name: "header-component",
styles: "margin:0;padding:0;background:black"
}
]
<div *ngFor="let conf of config">
<{{conf.name}} style="{{conf.styles}}"></{{conf.name}}>
</div>
Any idea's on getting this to work or an alternative approach?