ngx-nepali-number
Angular package that converts English numbers to Nepali numbers.
Installation
Use Node Package Manager npm to install ngx-nepali-number.
npm install ngx-nepali-number
Usage
Import NgxNepaliNumberModule
in the root module(AppModule
):
// Import module;
Add NgxNepaliNumberService
service wherever you want to use the ngx-nepali-number
.
;
You can use ngx-nepali-number
as both angular pipe
& directive
.
- Using as angular
pipe
in your template
The height of Mount Everest is {{ '8848' | nepaliNumber }} Meter.
- Using as angular
directive
in your template
Total Price:
if you want to bind converted nepali number into your formControl
name just pass [formControl]
as Angular Input
.
Component:
//...;
Template:
Total Price: You have entered {{ totalPrice.value }} as total price.
Creator
Hikmat Sijapati
License
ngx-nepali-number is MIT licensed.