Angular Pipes
angular-ngx-pipes is a library of Angular that contains some day-to-day useful pipelines.
Table of contents
Pipes
- [x] Linky Pipe (linky).
- [x] Text Pipe (text).
- [x] Timezone Pipe (timezone).
- [x] Html Pipe (html).
- [x] Hours Pipe (hours).
- [x] Safe Pipe (safe).
- [x] Contains Pipe (contains).
- [x] Trim Pipe (trim).
- [x] Highlight Pipe (highlight).
Getting started
angular-ngx-pipes
:
Step 1: Install NPM
npm i angular-ngx-pipes
Step 2: Import the PipesModule:
import {PipesModule} from 'angular-ngx-pipes';
@NgModule({
declarations: [AppComponent],
imports: [PipesModule],
bootstrap: [AppComponent]
})
export class AppModule {}
Pipes Usage Table
Pipe Name | Return Type | Input Required | Description |
---|---|---|---|
linky | string |
no | Converts a normal text to link. |
text | string |
no | Converts html text to normal text. |
timezone | string |
yes | Converts date-time to required timezone. |
html | string |
no | Converts normal text to html text. |
hours | string |
yes | Converts time('minutes', 'seconds') to hours-minutes. |
safe | string |
yes | Allows angular to trust the resource ('html', 'style', 'script', 'url', 'resourceUrl'). |
contains | boolean |
yes | Checks if the given value is present inside a string. |
trim | string |
no | Removes any whitespaces from the string. |
highlight | string |
yes | Highlights text that contains inside a string. |
Author
- [Sam Arora]
License
MIT