ng4-persian
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

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

  1. Complete README.md
  2. pDigitWords pipe Speed Up
  3. Write and Complete Example app in Project

Readme

Keywords

none

Package Sidebar

Install

npm i ng4-persian

Weekly Downloads

1

Version

2.2.0

License

MIT

Last publish

Collaborators

  • bitbeter