title: How to bind a property to style.width in pixels?
body: <p>I'm using Angular 2 and I've written the below code:</p>
  
  <pre><code>&lt;div [style.width.px]="width"&gt;some texts &lt;/div&gt;
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>&lt;div [ngStyle]="{'width.px': width}"&gt;some texts &lt;/div&gt;
  
  export class MyComponent
  {
   width: number = 150;
  }
  </code></pre>
  
  <p>But it doesn't bind the width to the <code>div</code> element.</p>
  
  <p>What am I doing wrong?</p>