title: Angular custom pipe not be found
body: <p>In my application I need a custom pipe globally, I try to implement it following <a href="https://angular.io/guide/pipes#custom-pipes" rel="noreferrer">angular pipe</a>
   but i see always this error </p>
  
  <blockquote>
    <p>Template parse errors: The pipe 'formatdate' could not be found</p>
  </blockquote>
  
  <p><strong>formatdate.pipe</strong></p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  
  @Pipe({
    name: 'formatdate'
  })
  
  export class FormatdatePipe implements PipeTransform {
  
    transform(dateJson: any, args?: any): any {
  .
   //code...
  .
        return dateJson;
      }
    }
  }
  </code></pre>
  
  <p><strong>app.module</strong></p>
  
  <pre><code>import { FormatdatePipe } from './shared/pipes/formatdate.pipe';
  @NgModule({
    declarations: [
      AppComponent, FormatdatePipe 
    ],
  </code></pre>
  
  <p>This pipe works if I import it in all my module and not in the principal app.module, do I need a routin pipe module or something</p>