mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
**Pipes Sample Code** Migrated all sample code in the `examples/pipes` folder. Did not touch the pipes in the ToH or Testing folders. >The existing, complex discussion of the `CurrencyPipe` within `pipes-transform-data.md` cried out for a new `concurrency-formatting.component` example`. **Extracted "pipe precedence" into its own page** The topic had been extracted from `pipe.md` and tacked on to the bottom of the `pipes-overview.md` page. It's an advanced and somewhat obscure topic that doesn't belong in the overview. Rather than throw it away, I created a new `pipe-precedence.md` page and added it to the bottom of the pipes section navigation. I also tried to improve both the guide text and the companion component, `precedence.component`. **How to create a pipe is missing** The readers are told they can create their own pipes in several places throughout the docs. But there are no links and you can't navigate to a page that covers the topic. This is a serious omission! The topic is introduced in the `pipes-custom-data-trans.md` page (extracted verbatim from `pipes.md`). But you can't navigate to this page and their are no links to it. TODO: restore this page and add it to the left-nav. **Change `pipes.md` references to `pipe-overview.md`** The original, kitchen-sink page, `pipes.md`, was disconnected from navigation long ago, in favor of multiple pages such as `pipe-overview.md`. The page is still in the AIO documentation and can be found by searching or by links from 3rd party documenters. Landing on that page hides the left-nav. In this commit, we treat `pipes.md` as deprecated (which it seems to be). Therefore, this commit retargets previous `pipes.md` references to `pipe-overview.md`. >The `change-detection-slow-computations.md` is the exception. It refers to "pure pipes", a subject not covered in the current pipe documentation. That reference is retargeted to `api/core/Pipe#pure`. Certain code files are only referenced in `pipe.md`. They still work and are displayed in the overall pipes code sample as before. Now they are marked with deprecation comments for future treatment or removal. For consistency, certain sections of `pipes.md` were replaced by the contents of the corresponding current pages. PR Close #51333
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.
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: trueflag to the pipe's decorator or declare it as a part of anNgModuleby adding to that module's declarations array. - Import it in the standalone components and/or the
NgModuleswhere 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 theNgModule. - If the pipe is standalone or is declared in another
NgModule, add it to theimportsfield of the standalone component or the currentNgModule.
If you recently added an import or declaration, you may need to restart your server to see these changes.
@reviewed 2022-05-22