I need to interpolate a value inside of an ngClass
expression but I can't get it to work.
I tried these solution which are the only ones that makes sense to me, these two fails with the interpolation:
<button [ngClass]="{'{{namespace}}-mybutton': type === 'mybutton'}"></button>
<button [ngClass]="{namespace + '-mybutton': type === 'mybutton'}"></button>
This one works with the interpolation but fails with the dynamically added class because the entire string gets added as a class:
<button ngClass="{'{{namespace}}-mybutton': type === 'mybutton'}"></button>
So my question is how do you use dynamic classnames in ngClass
like this?