Component is not part of any NgModule or the module has not been imported into your module


#1

A) I make a simple custom Pipe

@Pipe({name: ‘grDate’})
export class GrDatePipe implements PipeTransform {
transform(date, format) {
return moment(date).format(‘LL’);
}
}

B) I import the pipe in @NgModule (file app.module.ts)

  1. import {GrDatePipe} from ‘…/pipes/gr.date’

@NgModule({
declarations: [

GrDatePipe
],

  1. I implement the custom pipe (home.html)

ion-list *ngFor=“let todo of todos | name: grDate”

And i take the error:
Component GrDatePipe is not part of any NgModule or the module has not been imported into your module

Can anyone help me?


#2

Sorry it’s my false.!!!


#3

i have same problem any solution?


#4

Also our falsey. (sic)

Our problem was that we were using a variable to store declarations (which were also used for entrycomponents), since this was being copied into entryComponents unnecessarily, it was throwing this error (which was a shite error, tbh).

[copied from GitHub issue: https://github.com/driftyco/ionic/issues/9303]