ng4-persian
v2.2.0
Published
Persian Language tools for angular 4 and angular 2, based on [angular-cli](https://github.com/angular/angular-cli) and [Ng4Basic](https://gitlab.com/bitbeter/ng4-basic) which is basic project based on angular-cli that you can use for creating your own lib
Downloads
6
Readme
Ng4Persian
Persian Language tools for angular 4 and angular 2, based on angular-cli and Ng4Basic which is basic project based on angular-cli that you can use for creating your own libraries on it.
Installation
npm install -g ng4-persian
Usage
Pipes
pJalali
- Pipe
this pipe will transform date object to jalali (Shamsi) format date.
Example
In angular component
<!-- 2017/6/22 (month start from zero in Date object) -->
day = new Date(2017, 5, 22);
In html
<p [innerText]="day | pJalali"></p>
Result
1396/4/1
pNumber
- Pipe
this pipe will transform english number to persian number.
Example
In angular component
number = 123;
In html
<p [innerText]="number | pNumber"></p>
Result
۱۲۳
pDigitWords
- Pipe
this pipe will transform english number to persian words.
Example
In angular component
number = 123;
In html
<p [innerText]="number | pDigitWords"></p>
Result
صد و بیست و سه
Contributing
This is a open-source project. Fork the project, complete the code and send pull request.
Thanks Note
pJalali
pipe based on the jalali-moment project, and persianJs and
angular-persian ideas, which are angularJs plugins, used for creating pNumber
and pDigitWords
pipes.
Roadmap
- Complete README.md
pDigitWords
pipe Speed Up- Write and Complete Example app in Project