Usually, I can style the very root of my component by using the *:host* pseudo style like this.

```
:host{ border: 1px solid gold; }

```

But how shold I handle if said style is supposed to be set dynamically, based on the parameters passed to *@Input*?

The only way I can think of at the moment is to add an auxilliary DIV and style it like so.

```
<div [ngClass]="styleMeDynamically"> ... </div>

```

Is there a way to apply a style dynamically directly on the host without the injected DIV?

I've found [this suggestion](https://stackoverflow.com/a/37258650/1525840) but it requires explicitly stating the classes and connecting them to separate inputs. I'd like to get a config object as passed in parameter and bind the styling using *[ngClass]* to retail full flexibility.