decorator
Decorator that marks a class as pipe and supplies configuration metadata.
Option | Description |
---|---|
name | The pipe name to use in template bindings. Typically uses lowerCamelCase because the name cannot contain hyphens. |
pure? | When true, the pipe is pure, meaning that the |
standalone? | Angular pipes marked as |
A pipe class must implement the PipeTransform
interface. For example, if the name is "myPipe", use a template binding expression such as the following:
{{ exp | myPipe }}
The result of the expression is passed to the pipe's transform()
method.
A pipe must belong to an NgModule in order for it to be available to a template. To make it a member of an NgModule, list it in the declarations
field of the NgModule
metadata.
name |
---|
The pipe name to use in template bindings. Typically uses lowerCamelCase because the name cannot contain hyphens. |
|
pure |
---|
When true, the pipe is pure, meaning that the |
|
If the pipe has internal state (that is, the result depends on state other than its arguments), set |
standalone |
---|
Angular pipes marked as |
|
More information about standalone components, directives, and pipes can be found in this guide. |
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/core/Pipe