Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geometricpanda/angular-what-is-a-pipe
This repository shows some use cases for Angular Pipes
https://github.com/geometricpanda/angular-what-is-a-pipe
angular
Last synced: about 1 month ago
JSON representation
This repository shows some use cases for Angular Pipes
- Host: GitHub
- URL: https://github.com/geometricpanda/angular-what-is-a-pipe
- Owner: geometricpanda
- Created: 2022-12-03T10:39:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-03T11:45:50.000Z (about 2 years ago)
- Last Synced: 2024-10-27T13:16:06.596Z (3 months ago)
- Topics: angular
- Language: TypeScript
- Homepage: https://angular-what-is-a-pipe.netlify.app/
- Size: 124 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular - What is a Pipe?
Angular Pipes are functions which run within the `Template` and allow us to transform data.
They are used to format data for display, and are commonly used to format dates, currency, and strings.
There are two types of pipes:
- Pure Pipes
- Impure Pipes## Pure Pipes
Pure pipes are the default type of pipe. They are called pure because the Angular framework will call the
pipe's `transform()` method only when it detects a pure change to the input value.A pure change is either a change to a primitive input value (String, Number, Boolean, Symbol) or a changed.
## Impure Pipes
Impure pipes are called impure because the Angular framework will call the pipe's `transform()` method
every time it runs the `detectChanges()` cycle, regardless of whether the value or parameters have changed.## Reference:
- https://angular.io/guide/pipes