ngx-useful-libs
v1.1.0
Published
useful and practical Directives and Pipes for Angular projects
Downloads
9
Maintainers
Readme
NgxUsefulLibs
🎉 useful and practical Directives and Pipes for Angular projects
📦Demo
Install
- NPM: npm i ngx-useful-libs
- YARN: yarn add ngx-useful-libs
Usage
Import NgxUsefulLibsModule
to your working module
import { NgxUsefulLibsModule } from 'ngx-useful-libs';
@NgModule({
imports: [
NgxUsefulLibsModule
]
})
export class AppModule { }
To use this library, see the demo link
📦Directive
- OnlyDecimals
- OnlyNumbers
directive to force the user to enter numbers.
Advantage of using this directive The possibility of using input with text type with [maxlength], [minlength], [max], [min] attribute And convert Persian and Arabic numerals to English numerals As well as a thousand separators
📦Pipe
- sort
Sort array of objects with pipe
- random
Random numbers or arrays of objects
- secondToTime
Convert second to time string like this: 879456123 => 21:22:03
- numberToPersianString
Convert number to persian characters
📦FormValidator
- checkNationalCode
Check iranian national code
- checkMobileNumber
Check iranian mobile number
- checkPhoneNumber
Check phone number start with zero
- checkNumberCharacters
Only use number
- checkPersianCharacters
Only use persian characters
- checkEnglishCharacters
Only use english characters
- checkEnglishAndNumberCharacters
Only use english characters with numbers
- notStartWithNumber
Do not start with numbers
- checkEmail
Check email address
Author
💻Mohammadreza samani | FrontEnd Developer