Dynamic classname inside ngClass in angular 2 : <p>I need to interpolate a value inside of an <code>ngClass</code> expression but I can't get it to work.</p>

<p>I tried these solution which are the only ones that makes sense to me, these two fails with the interpolation:</p>

<pre><code>&lt;button [ngClass]="{'{{namespace}}-mybutton': type === 'mybutton'}"&gt;&lt;/button&gt;
&lt;button [ngClass]="{namespace + '-mybutton': type === 'mybutton'}"&gt;&lt;/button&gt;
</code></pre>

<p>This one works with the interpolation but fails with the dynamically added class because the entire string gets added as a class:</p>

<pre><code>&lt;button ngClass="{'{{namespace}}-mybutton': type === 'mybutton'}"&gt;&lt;/button&gt;
</code></pre>

<p>So my question is how do you use dynamic classnames in <code>ngClass</code> like this?</p>
