2.2.0 • Published 8 years ago
ng4-persian v2.2.0
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-persianUsage
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/1pNumber - 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
pDigitWordspipe Speed Up- Write and Complete Example app in Project