UsePipes
Decorator that binds pipes to the scope of the controller or method, depending on its context.
@UsePipes(...pipes: (Function | PipeTransform<any, any>)[])
Parameters
| Option | Type | Description |
|---|---|---|
pipes
|
(Function | PipeTransform |
a single pipe instance or class, or a list of pipe instances or classes. |
Returns
ClassDecorator & MethodDecorator
See also
Description
When @UsePipes is used at the controller level, the pipe will be
applied to every handler (method) in the controller.
When @UsePipes is used at the individual handler level, the pipe
will apply only to that specific method.
Further information is available in the Usage Notes...
Usage notes
Pipes can also be set up globally for all controllers and routes
using app.useGlobalPipes(). See here for details