title: format number angular in component
body: <p><strong>hello,</strong></p>
  <p>I have a number that I am trying to transform into my ts file but I can't get it to work.</p>
  <p>here is the number: 123456.059</p>
  <p>expected result: 1.234</p>
  <p>Thanks for your help.</p>
  <pre><code>import { DecimalPipe } from '@angular/common';
  
  class MyService {
    constructor(private _decimalPipe: DecimalPipe) {}
  
    transformDecimal(num) {
      return this._decimalPipe.transform(num, '1.2-2');
    }
  }
  </code></pre>