0.0.39 • Published 2 years ago
rendelo-common v0.0.39
Rendelo-Common Library
Rendelo-Common is an Angular library used for implementing functions, pipes, services etc., which are used in all of the angular projects made by Aranyklinika.
Table of contents
1. Installation
2. How to use
-2.1 Pipes
-2.2 Validators
-2.3 Services
3. External libraries
Installation
- Run the
npm install rendelo-common
command to install the package. - Run
npm install moment
command to install moment.js. (Necessary for the library!)
How to use
Pipes
- Import
RendeloPipesModule
fromrendelo-common
in yourapp.module.ts
file and also add it to theimports
array! - You can now use all pipes everywhere in your project. example: {{variableName | pipeName}}
Available pipes:
fileSize
: Transforms a number to a file size unit based on its value. (from 0-3 » B to GB)firstUpperCase
: Transforms given string to start with an uppercase letter.newTabLink
: Extends anchor tag with arguments to open in a new tab.operator
: Returns modified string based on its original value, or stays the same if its unique.plural
: Transform given value into plural form.safeHtml
: Bypass security and trust the given value to be safe HTML.safeScript
: Bypass security and trust the given value to be safe JavaScript.safeStyle
: Bypass security and trust the given value to be safe style value (CSS).safeUrl
: Bypass security and trust the given value to be a safe style URL.status
: Return message based on its status model value.
Validators
- Import
validator-name
fromrendelo-common
in thecomponent-name.component.ts
file, where you want to use it. - Add the validator in your
Reactive form
validators array.
Available validators:
ValidateDate
: Check if the given input is a valid date or not.ValidateTaj
: Check if the given input contains a valid TAJ number.ValidateForbidden
: Check if the given input contains the forbidden values from the forbiddenValues array.
Services
- Import
service-name
fromrendelo-common
in yourcomponent-name.component.ts
file. - Create an instance of the service in the components constructor
- You can use the service in your component!
Available services:
CommonService
: Collection of useful functions, which may be used in more parts of the application.TimerService
: Implements a timer, which can be fully customized.
Used external libraries
This library was generated with Angular CLI
0.0.20
2 years ago
0.0.22
2 years ago
0.0.23
2 years ago
0.0.24
2 years ago
0.0.25
2 years ago
0.0.37
2 years ago
0.0.38
2 years ago
0.0.39
2 years ago
0.0.30
2 years ago
0.0.31
2 years ago
0.0.32
2 years ago
0.0.33
2 years ago
0.0.34
2 years ago
0.0.35
2 years ago
0.0.36
2 years ago
0.0.26
2 years ago
0.0.27
2 years ago
0.0.28
2 years ago
0.0.29
2 years ago
0.0.19
2 years ago
0.0.18
2 years ago
0.1.0
2 years ago
0.0.17
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago