title: How can we use Provider in Pipe files while using Deep Linking and Lazy Loading Ionic 3?
body: <p>I want to use a Provider, named as <code>Translation.ts</code> with a returnResult function in a Pipe named as <code>TranslatePipe.ts</code>.  Translation.ts is </p>
  
  <pre><code>@Injectable()
  export class TranslationProvider
  
    constructor() { }
  
    getResult(value) { returns something ; }
  
  }
  </code></pre>
  
  <p>and TranslatePipe.ts is given as </p>
  
  <pre><code>@Pipe({
    name: 'translation',
  })
  export class TranslationPipe implements PipeTransform {
  
    constructor(public translateService: TranslationProvider) {
  
    }
  
  
    transform(value: string, ...args) {
      return this.translateService.getResult(value);
    }
  </code></pre>
  
  <p>MY project is Ionic 3 and I use Lazy Loading. My page is ExamplePage
  In ExamplePage.html I want to use piping as {{'something' | translation}}</p>
  
  <p>and example.ts is </p>
  
  <pre><code>@IonicPage()
  @Component({
    selector: 'example',
    templateUrl: 'example.html',
  })
  export class ExamplePage {
  
    constructor(public translate: TranslationProvider) {  }
  }
  </code></pre>
  
  <p>app.module is something like that</p>
  
  <pre><code>@NgModule({
    declarations: [
      TranslatePipe,
    ],
    imports: [
      BrowserModule,
      FormsModule,
      HttpModule,
      IonicModule.forRoot(MyApp),
      IonicStorageModule.forRoot()
    ],
    bootstrap: [IonicApp],
    entryComponents: [ .. ],
    providers: [
      {provide: ErrorHandler, useClass: IonicErrorHandler},
      TranslationProvider
    ]
  })
  </code></pre>
  
  <p>There is something related with this subject but they dont work such as</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/43775715/ionic-3-lazy-loading-with-amdateformat-pipe">Ionic 3 Lazy Loading with amDateFormat pipe</a> or </li>
  <li><a href="https://stackoverflow.com/questions/44735628/pipe-not-found-in-custom-component-ionic-3-lazy-loading">Pipe not found in custom component - Ionic 3 (Lazy Loading)</a></li>
  </ul>
  
  <p>I try to modify example.module, I added Provider and Pipe but it did not work.
  Would you give me any recommendation about the solution?</p>