[14:13:30] Error: Error at /Workspace/ionic/ionic_2/Schedullo/.tmp/pages/todo/todo.ts:15:3
[14:13:30] Argument of type ‘{ selector: string; templateUrl
[14:13:30] string; pipes: any[]; }’ is not assignable to parameter of type ‘Component’.
[14:13:30] Object literal may only specify known properties, and ‘pipes’ does not exist in type ‘Component’.
[14:13:30] Error at /Workspace/ionic/ionic_2/Schedullo/.tmp/pages/todo/todo.ngfactory.ts:1072:78
[14:13:30] Supplied parameters do not match any signature of call target.
[14:13:30] ngc failed
[14:13:30] ionic-app-script task: “build”
[14:13:30] Error: Error
You need to include pipe in the declarations array of the AppModule.
https://angular.io/docs/ts/latest/guide/pipes.html
Can I have running example in ionic 2? because i have tried more than one time , so just a simple example with import and all stuff which is required.
Thanks
Add your Pipes in the src/app/app.module.ts only to the @NgModule ({ declarations: }) array, not to the providers.
import { Keyspipe } from ‘…/pipes/keyspipe’;
@NgModule({
declarations: [
Keyspipe //this is where your pipe should be added, in this case pipe is "Keyspipe"
MyApp,
UsersPage,
ReposPage,
OrganisationsPage,
UserDetailsPage,
],
1 Like