Object literal may only specify known properties, and 'pipes' does not exist in type...

Discussão em 'Angular' iniciado por muchhacho, Novembro 8, 2024.

  1. muchhacho

    muchhacho Guest

    I'm trying to create a custom pipe in Angular 2. When I tried to run it, I got an error message:


    Object literal may only specify known properties, and 'pipes' does not exist in type 'Component'
    ​

    Then, I Googled it and found out, I should use declarations: [ mypipe] Instead of pipes: [mypipe], but I got similar error again:


    Object literal may only specify known properties, and 'declarations' does not exist in type 'Component'
    ​

    Can anyone explain this, please?

    EDIT:

    I've just deleted the pipes/declarations line and it worked without any errors.

    Continue reading...

Compartilhe esta Página