title: Why is adding DatePipe to an Injectable Service constructor failing?
body: <p><em><strong>NullInjectorError: No provider for DatePipe!</strong></em></p>
  <p>I get that error when I tried to add the DatePipe to a service constructor.</p>
  <p>Note: <strong>DatePipe is already specified in the list of providers.</strong></p>
  <pre><code>import { DatePipe } from '@angular/common';
  ...
  
  @Injectable({
      providedIn: 'root'
  })
  export class MyService {
      ...
      ...
      constructor(private datePipe: DatePipe) {}
  </code></pre>