Code Monkey home page Code Monkey logo

ngx-num-to-words's Introduction

angular-material-extensions's logo

ngx-num-to-words - Angular library simplifying generation of mailto links with Typescript

highly inspired and depends on n2words Big thanks to @forzagreen :heart

--> nodejs module

npm version npm demo docs: typedoc Join the chat at https://gitter.im/angular-material-extensions/Lobby license

ngx-num-to-words demonstration

Built by and for developers ❤️

Do you have any question or suggestion ? Please do not hesitate to contact us! Alternatively, provide a PR | open an appropriate issue here

If you like this project, support angular-material-extensions by starring ⭐ and sharing it 📢

Table of Contents

View all the directives and components in action at https://anthonynahas.github.io/ngx-num-to-words


  • Angular developed and tested with 11.x

Install via npm. (Alternative)

Now install ngx-num-to-words via:

npm install --save n2words ngx-num-to-words 

Import the library

If you installed the library via angular schematics, you can skip this step

import { NgxNumToWordsModule } from 'ngx-num-to-words'; 

@NgModule({
  declarations: [AppComponent, ...],
  imports: [NgxNumToWordsModule, ...],  
  bootstrap: [AppComponent]
})
export class AppModule {
}

Other modules in your application like for lazy loading import NgxNumToWordsModule into your feature module:

<h1><b>{{numberInWords}}</b></h1>
import { NgxNumToWordsService, SUPPORTED_LANGUAGE } from 'ngx-num-to-words';


numberInWords!: string;
lang!: SUPPORTED_LANGUAGE = 'en';
value = 123;

 constructor(private ngxNumToWordsService: NgxNumToWordsService) {
  }


ngOnInit(): void {

    this.numberInWords = this.ngxNumToWordsService.inWords(value, this.lang);

 }


Using the pipe inWords

<span>{{ 123 | inWords }}</span> // default en language
<span>{{ 123 | inWords:'de' }}</span> // custom language --> german in this case

hier are some example

ngx-num-to-words demonstration

ngx-num-to-words demonstration

ngx-num-to-words demonstration

ngx-num-to-words demonstration

ngx-num-to-words demonstration

ngx-num-to-words demonstration

ngx-num-to-words demonstration

ngx-num-to-words demonstration

Supported Languages

  • en (English, default)
  • ar (Arabic)
  • cz (Czech)
  • dk (Danish)
  • de (German)
  • es (Spanish)
  • fr (French)
  • fa (Farsi)
  • he (Hebrew)
  • it (Italian)
  • ko (Korean)
  • lt (Lithuanian)
  • lv (Latvian)
  • nl (Dutch)
  • no (Norwegian)
  • pl (Polish)
  • pt (Portuguese)
  • ru (Russian)
  • sr (Serbian)
  • tr (Turkish)
  • uk (Ukrainian)

Build the library

$ npm run build:lib

Serve the demo app

$ npm start

Other Angular Libraries


Built by and for developers ❤️ we will help you 👊


jetbrains logo

This project is supported by jetbrains with 1 ALL PRODUCTS PACK OS LICENSE incl. webstorm


Copyright (c) 2020 Anthony Nahas. Licensed under the MIT License (MIT)

angular-material-extensions's logo

ngx-num-to-words's People

Contributors

anthonynahas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.