angular/aio/content/errors/NG0302.md

1.3 KiB

@name Pipe Not Found @category runtime @videoUrl https://www.youtube.com/embed/maI2u6Sxk9M @videoCaption Note: The video predates standalone pipes, please refer to additional instructions below if you use standalone pipes. @shortDescription Pipe not found!

@description Angular can't find a pipe with this name.

The pipe referenced in the template has not been named or declared properly.

To use the pipe:

  • Ensure the name used in a template matches the name defined in the pipe decorator.
  • Either mark it as standalone by adding the standalone: true flag to the pipe's decorator or declare it as a part of an NgModule by adding to that module's declarations array.
  • Import it in the standalone components and/or the NgModules where it is needed.

@debugging Use the pipe name to trace where the pipe is declared and used.

To resolve this error:

  • If the pipe is local to the NgModule, give it a unique name in the pipe's decorator and declared it in the NgModule.
  • If the pipe is standalone or is declared in another NgModule, add it to the imports field of the standalone component or the current NgModule.

If you recently added an import or declaration, you may need to restart your server to see these changes.

@reviewed 2022-05-22