2.1.2 • Published 3 years ago
angular-ngx-pipes v2.1.2
Angular Pipes
angular-ngx-pipes is a library of Angular that contains some day-to-day useful pipelines.
Table of contents
Pipes
- Linky Pipe (linky).
- Text Pipe (text).
- Timezone Pipe (timezone).
- Html Pipe (html).
- Hours Pipe (hours).
- Safe Pipe (safe).
- Contains Pipe (contains).
- Trim Pipe (trim).
- Highlight Pipe (highlight).
Getting started
Step 1: Install angular-ngx-pipes
:
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
License
MIT