0.0.2 • Published 4 years ago
ngx-spanish-pipe v0.0.2
Ngx spanish pipe
Installation
Install the generator:
npm install ngx-spanish-pipe
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { NgxSpanishPipeModule } from 'ngx-spanish-pipe';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, FormsModule, HttpModule, NgxSpanishPipeModule],
bootstrap: [AppComponent]
})
export class AppModule {}
It contains a pipe that tansforms a number without dot and commas to spanish format (1000000 => 1.000.000).
Usage
The module thtat contains the currency mask is this: NgxSpanishPipeModule
. And it is used as follows:
<td>{{number | NgxNumberEsPipe:'number of decimals'}}</td>