mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
improve the error information of NG0302 by including details about standalone pipes (and components) PR Close #46090
1.3 KiB
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.
In order for a pipe to be used:
- it must be declared as a part of an
NgModule(added to thedeclarationsarray) or marked as standalone (by adding thestandalone: trueflag to the Pipe decorator). - it must be imported in an
NgModuleor a standalone component where it is used. - the name used in a template must match the name defined in the Pipe decorator.
@debugging Use the pipe name to trace where the pipe is declared and used.
To resolve this error, ensure that:
- If the pipe is local to the
NgModule, it is uniquely named in the pipe's decorator and declared in theNgModule. - If the pipe is standalone or from another
NgModule, it is added to theimportsfield of the currentNgModuleor standalone component.
If you recently added an import or declaration, you may need to restart your server to see these changes.
@reviewed 2022-05-22